Changeset 2964 for branches/felix-testing-implementation/samples/test/tests/fragment/LoginSuccessViewTest.php
- Timestamp:
- 09/30/08 08:37:06 (3 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/felix-testing-implementation/samples/test/tests/fragment/LoginSuccessViewTest.php
r2962 r2964 19 19 public function testResponseRedirect() 20 20 { 21 $this->setArguments($this->createRequestDataHolder(array(AgaviWebRequestDataHolder::SOURCE_PARAMETERS => array('username' => ' foo', 'password' => 'bar'))));21 $this->setArguments($this->createRequestDataHolder(array(AgaviWebRequestDataHolder::SOURCE_PARAMETERS => array('username' => 'Chuck Norris', 'password' => 'kick')))); 22 22 $this->getContext()->getUser()->setAttribute('redirect', 'http://www.example.com/', 'org.agavi.SampleApp.login'); 23 23 $this->runView(); … … 28 28 public function testResponseHtml() 29 29 { 30 $this->setArguments($this->createRequestDataHolder(array(AgaviWebRequestDataHolder::SOURCE_PARAMETERS => array('username' => ' foo', 'password' => 'bar'))));30 $this->setArguments($this->createRequestDataHolder(array(AgaviWebRequestDataHolder::SOURCE_PARAMETERS => array('username' => 'Chuck Norris', 'password' => 'kick')))); 31 31 $this->runView(); 32 32 $this->assertResponseHasHTTPStatus(200); … … 37 37 $this->assertContainerAttributeExists('title'); 38 38 } 39 40 public function testResponseHasCookiesWhenRememberSet() 41 { 42 $this->setArguments($this->createRequestDataHolder(array(AgaviWebRequestDataHolder::SOURCE_PARAMETERS => array('username' => 'Chuck Norris', 'password' => 'kick', 'remember' => true)))); 43 $this->runView(); 44 $this->assertResponseHasHTTPStatus(200); 45 $this->assertViewResultEquals(''); 46 $this->assertHasLayer('content'); 47 $this->assertHasLayer('decorator'); 48 $this->assertResponseHasNoRedirect(); 49 $this->assertContainerAttributeExists('title'); 50 $this->assertResponseHasCookie('autologon[username]', array('value' => 'Chuck Norris', 'lifetime' => '1209600', 'path' => null, 'domain' => null, 'secure' => null, 'httponly' => null)); 51 $this->assertResponseHasCookie('autologon[password]', array('value' => 'd436130cf2f5024cfdb3aa7325322d530336b95f', 'lifetime' => '1209600', 'path' => null, 'domain' => null, 'secure' => null, 'httponly' => null)); 52 } 53 39 54 } 40 55

