Hello,
ive tried to setup a testcase which tests the same controller and action
twice. The first run seems to be okay but the second run fails.
The error seems to be somewhere here
pubic function existInFile ()
{
$blacklist = require_once $config->general->language . '/blacklist.php',
// output array for debugging
print_r($blacklist);
}
I get the array in the first test but in the second test it fails, so it
does not return the array to me.
Testcase
public function testIndex2Action() {
// TODO Auto-generated FooControllerTest->testBarAction()
$this->dispatch('/search/index2');
$this->assertModule('default');
$this->assertController('search');
$this->assertResponseCode(200);
$this->assertAction('index');
}
public function testIndex3Action() {
// TODO Auto-generated FooControllerTest->testBarAction()
$this->dispatch('/search/index2');
$this->assertModule('default');
$this->assertController('search');
$this->assertResponseCode(200);
$this->assertAction('index');
}
The error:
Time: 5 seconds
There was 1 failure:
1) testIndex3Action(StaticControllerTest)
Failed asserting last controller used was "search"
/home/donbosco/Zend/workspaces/DefaultWorkspace/zendframework/library/Zend/Test/PHPUnit/ControllerTestCase.php:930
/home/donbosco/Zend/workspaces/DefaultWorkspace/portalizm/trunk/penguin/test/application/default/controllers/StaticControllerTest.php:75
--
View this message in context:
http://www.nabble.com/including-an-array-with-require_once-failed-at-second-testcase-tp21872780p21872780.html
Sent from the Zend Framework mailing list archive at Nabble.com.