Doctrine's entity manager crashes and stays down
问题 So, when I run tests on my ZF/Doctrine application, some tests happen to break the Doctrine Entity Manager, and all the sequential tests fail due to EM being closed. I set the EM up in my tests/bootstrap.php: $application = new Zend_Application( APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini' ); $application->bootstrap(); (...) $bootstrap = $application->getBootstrap(); $em = $bootstrap->getResource('doctrinemanager'); Then I set it inside the test setUp() function ($this->