Details
Description
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:
tests/Zend/Db/Adapter/TestCommon.php
This requires some DDL that creates a table with LOB columns and also populates the table with 1 row. This is provided in:
tests/Zend/Db/TestUtil/Common.php
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:
tests/Zend/Db/TestUtil/Db2.php
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.
testAdapterFetchLob() is defined here