ZF-1868: Add a unit test to fetch a LOB column
As a first step to creating more test coverage for the Zend_Db component, I have created a simple unit test that fetches LOBs. It retrieves both a BLOB and a CLOB column, then does a string comparison.
The test is called testAdapterFetchLob() and is placed in the file:
This requires some DDL that creates a table with LOB columns and also populates the table with 1 row. This is provided in:
This may have to be changed because different databases may define LOBs differently. For example, MySQL uses TEXT, not CLOB.
Also, I made a DB2-specific modification to allow a string to be inserted as a BLOB in the file:
Please review the unit test and change as appropriate. If you also have some suggestions on what other type of LOB tests could be useful, I can add them as time permits.