Hi,
I followed the tutorial at zendcasts.com ( http://tinyurl.com/n4hee2 )
to setup testing environment for my ZF enabled application. Everything
went fine with regards to the tutorial.
But the tutorial recommends including a test class that extends
Zend_Test_PHPUnit_ControllerTestCase in the test bootstrap. I think it
is a bit awkward for your ModelTest and LibraryTest classes to extend a
class that in turn extends Zend_Test_PHPUnit_ControllerTestCase.
Is there a way to bootstrap your testing environment without extending
Zend_Test_PHPUnit_ControllerTestCase? I want to reuse the application's
Bootstrap.php in all my environments - development, testing and production.
I tried to bootstrap the application in my test like below:
[code]
$application = new Zend_Application(APPLICATION_ENV,APPLICATION_PATH .
'/configs/application.ini');
$application->bootstrap();
[/code]
But I get PHP session warnings because the user running tests is unable
to write to /var/some/path/apache/is/able/to/write/to.
Zend_Test_PHPUnit_ControllerTestCase mysteriously circumvents this.
Example code snippet is highly appreciated.
--
With warm regards,
Sudheer. S
Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net,
Personal: http://sudheer.net