in the docs the provided code for bootstrapping looks like
protected $application;
public function setUp() {
$this->bootstrap = array($this, 'appBootstrap');
parent::setUp();
}
public function appBootstrap() {
$this->application = new Zend_Application( ... );
$this->application->bootstrap();
}
i was curious why when i tried
protected $application;
public function setUp() {
$this->application = new Zend_Application( ... );
$this->application->bootstrap();
parent::setUp();
}
it failed. also when i tried moving bootstrapping the application in bootstrap.php it fails too
// bootstrap.php
...
$application = new Zend_Application( ... );
$application->bootstrap();
the reason why i thought of moving this to bootstrap.php is jon lebensold from zend casts extended the ControllerTestCase to handle all this bootstrapping in a separate class. i thought instead of extending the class, if i can move the code into the bootstrap.php in 1 place wont it be better
This is what my ControllerTestCase.php looks like:
TestHelper.php (Bootstrap)