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()); }
/** * 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()); }
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()); }