Ejemplo n.º 1
0
 function testPipedFilterIsAlsoPostFiltered()
 {
     $response = new T_Response();
     $filter1 = new T_Test_Response_FilterStub();
     $filter2 = new T_Test_Response_FilterStub($filter1);
     $filter2->preFilter($response);
     $filter2->postFilter($response);
     $this->assertTrue($filter1->isPreAndPostFiltered());
     $this->assertTrue($filter2->isPreAndPostFiltered());
 }
Ejemplo n.º 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());
 }
Ejemplo n.º 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());
 }