Zend_Test, identity and cookies

HRFMForum

New Member
I have ZF1 site and I'm testing it with phpunit.
I want to store cookies from one test(login) and pass it to other tests(post messages, etc).Or is there any way to setIdentity? This method doesn't work:\[code\]class IntegrationalTest extends ControllerTestCase { protected $identity; public function test1() { // some code here $this->assertTrue(Zend_Auth::getInstance()->hasIdentity()); // GOOD $this->identity = Zend_Auth::getInstance()->getIdentity(); } public function test2() { Zend_Auth::getInstance()->getStorage()->write($this->identity); $this->assertTrue(Zend_Auth::getInstance()->hasIdentity()); // FAILED! }}\[/code\]
 
Top