ZF-8087: Error within unit testing with PHPUnit - Zend_Db_Table_Exception: No adapter found for [...]
I am using TDD with Zend Framework.
I've set up tests for every component of my application. Within testing, I am using an SQLite database that replaces the live database.
With 1.8.4, all went well.
With 1.9, I am getting random errors during testing, for example the following:
7) ModelTechnologyMapperTest::testFetchAll Zend_Db_Table_Exception: No adapter found for Default_Model_DbTable_Technologies
/Users/skiller/PHP Projects/skiller/library/Zend/Db/Table/Abstract.php:754 /Users/skiller/PHP Projects/skiller/library/Zend/Db/Table/Abstract.php:739 /Users/skiller/PHP Projects/skiller/library/Zend/Db/Table/Abstract.php:268 /Users/skiller/PHP Projects/skiller/application/models/TechnologyMapper.php:17 /Users/skiller/PHP Projects/skiller/application/models/TechnologyMapper.php:32 /Users/skiller/PHP Projects/skiller/application/models/TechnologyMapper.php:52 /Users/skiller/PHP Projects/skiller/tests/application/models/TechnologyMapperTest.php:86
The strange thing is that other tests for model classes in the same test suite don't yield such errors although they share the exact same database and configuration parameters.
Since some tests work and some don't, I suspect a problem with the correct initiation sequence within the extended ZF/PHPUnit framework.