Esempio n. 1
0
 /**
  * Tests the set_cache() method
  *
  * @test
  * @dataProvider provider_set_cache
  *
  * @return null
  */
 public function test_set_cache($headers, $cache_control, $expected)
 {
     /**
      * Set up a mock response object to test with
      */
     $response = $this->getMock('Response');
     $response->expects($this->any())->method('parse_cache_control')->will($this->returnValue($cache_control));
     $response->expects($this->any())->method('headers')->will($this->returnValue($headers));
     $request = new Request_Client_Internal();
     $this->assertEquals($request->set_cache($response), $expected);
 }