Changeset 2962

Show
Ignore:
Timestamp:
09/29/08 17:23:03 (7 weeks ago)
Author:
felix
Message:

adds a test for the html response without redirect

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/felix-testing-implementation/samples/test/tests/fragment/LoginSuccessViewTest.php

    r2961 r2962  
    1717  } 
    1818   
    19   public function testResponseHtml() 
    20   {    
     19  public function testResponseRedirect() 
     20  { 
    2121    $this->setArguments($this->createRequestDataHolder(array(AgaviWebRequestDataHolder::SOURCE_PARAMETERS => array('username' => 'foo', 'password' => 'bar')))); 
    2222    $this->getContext()->getUser()->setAttribute('redirect', 'http://www.example.com/', 'org.agavi.SampleApp.login'); 
     
    2525    $this->assertResponseRedirectsTo(array('code' => '302', 'location' => 'http://www.example.com/')); 
    2626  } 
     27   
     28  public function testResponseHtml() 
     29  { 
     30    $this->setArguments($this->createRequestDataHolder(array(AgaviWebRequestDataHolder::SOURCE_PARAMETERS => array('username' => 'foo', 'password' => 'bar')))); 
     31    $this->runView(); 
     32    $this->assertResponseHasHTTPStatus(200); 
     33    $this->assertViewResultEquals(''); 
     34    $this->assertHasLayer('content'); 
     35    $this->assertHasLayer('decorator'); 
     36    $this->assertResponseHasNoRedirect(); 
     37    $this->assertContainerAttributeExists('title'); 
     38  } 
    2739} 
    2840