Example #1
0
 function testFilterIsNotAbortedIfPreAndPostFilterHaveAlreadyExecuted()
 {
     $response = new T_Response();
     $filter = new T_Test_Response_FilterStub();
     $filter->preFilter($response);
     $filter->postFilter($response);
     $filter->abortFilter($response);
     $this->assertFalse($filter->isAborted());
 }
Example #2
0
 /**
  * Test can pipe prior filter.
  */
 function testCanPipePriorFilter()
 {
     $prior = new T_Test_Response_FilterStub();
     $filter = new T_Response_ClientCache(60 * 60, 'public', $prior);
     $response = new T_Test_ResponseStub();
     $filter->preFilter($response);
     $this->assertTrue($prior->isOnlyPreFiltered());
     $filter->postFilter($response);
     $this->assertTrue($prior->isPreAndPostFiltered());
 }
Example #3
0
 function testCanPipePriorFilter()
 {
     $prior = new T_Test_Response_FilterStub();
     $filter = new T_Response_ConditionalGet(1188994102, $this->getEnvironment(), $prior);
     $response = new T_Test_ResponseStub();
     $filter->preFilter($response);
     $this->assertTrue($prior->isOnlyPreFiltered());
     $filter->postFilter($response);
     $this->assertTrue($prior->isPreAndPostFiltered());
 }