Open Journal Systems  3.3.0
CachePluginTest.php
1 <?php
2 
4 
14 use Doctrine\Common\Cache\ArrayCache;
15 
22 {
23  public function testAddsDefaultStorage()
24  {
25  $plugin = new CachePlugin();
26  $this->assertInstanceOf('Guzzle\Plugin\Cache\CacheStorageInterface', $this->readAttribute($plugin, 'storage'));
27  }
28 
29  public function testAddsDefaultCollaborators()
30  {
31  $this->assertNotEmpty(CachePlugin::getSubscribedEvents());
32  $plugin = new CachePlugin(array(
33  'storage' => $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')->getMockForAbstractClass()
34  ));
35  $this->assertInstanceOf('Guzzle\Plugin\Cache\CacheStorageInterface', $this->readAttribute($plugin, 'storage'));
36  $this->assertInstanceOf(
37  'Guzzle\Plugin\Cache\CanCacheStrategyInterface',
38  $this->readAttribute($plugin, 'canCache')
39  );
40  $this->assertInstanceOf(
41  'Guzzle\Plugin\Cache\RevalidationInterface',
42  $this->readAttribute($plugin, 'revalidation')
43  );
44  }
45 
47  {
48  $this->assertNotEmpty(CachePlugin::getSubscribedEvents());
49  $plugin = new CachePlugin(array('can_cache' => function () {}));
50  $this->assertInstanceOf(
51  'Guzzle\Plugin\Cache\CallbackCanCacheStrategy',
52  $this->readAttribute($plugin, 'canCache')
53  );
54  }
55 
57  {
58  $p = new CachePlugin(new DoctrineCacheAdapter(new ArrayCache()));
59  $p = new CachePlugin(new DefaultCacheStorage(new DoctrineCacheAdapter(new ArrayCache())));
60  }
61 
62  public function testUsesCreatedCacheStorage()
63  {
64  $plugin = new CachePlugin(array(
65  'adapter' => $this->getMockBuilder('Guzzle\Cache\CacheAdapterInterface')->getMockForAbstractClass()
66  ));
67  $this->assertInstanceOf('Guzzle\Plugin\Cache\CacheStorageInterface', $this->readAttribute($plugin, 'storage'));
68  }
69 
70  public function testUsesProvidedOptions()
71  {
72  $can = $this->getMockBuilder('Guzzle\Plugin\Cache\CanCacheStrategyInterface')->getMockForAbstractClass();
73  $revalidate = $this->getMockBuilder('Guzzle\Plugin\Cache\RevalidationInterface')->getMockForAbstractClass();
74  $plugin = new CachePlugin(array(
75  'storage' => $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')->getMockForAbstractClass(),
76  'can_cache' => $can,
77  'revalidation' => $revalidate
78  ));
79  $this->assertSame($can, $this->readAttribute($plugin, 'canCache'));
80  $this->assertSame($revalidate, $this->readAttribute($plugin, 'revalidation'));
81  }
82 
83  public function satisfyProvider()
84  {
85  $req1 = new Request('GET', 'http://foo.com', array('Cache-Control' => 'no-cache'));
86 
87  return array(
88  // The response is too old to satisfy the request
89  array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-age=20')), new Response(200, array('Age' => 100)), false, false),
90  // The response cannot satisfy the request because it is stale
91  array(new Request('GET', 'http://foo.com'), new Response(200, array('Cache-Control' => 'max-age=10', 'Age' => 100)), false, false),
92  // Allows the expired response to satisfy the request because of the max-stale
93  array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-stale=15')), new Response(200, array('Cache-Control' => 'max-age=90', 'Age' => 100)), true, false),
94  // Max stale is > than the allowed staleness
95  array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-stale=5')), new Response(200, array('Cache-Control' => 'max-age=90', 'Age' => 100)), false, false),
96  // Performs cache revalidation
97  array($req1, new Response(200), true, true),
98  // Performs revalidation due to ETag on the response and no cache-control on the request
99  array(new Request('GET', 'http://foo.com'), new Response(200, array(
100  'ETag' => 'ABC',
101  'Expires' => date('c', strtotime('+1 year'))
102  )), true, true),
103  );
104  }
105 
109  public function testChecksIfResponseCanSatisfyRequest($request, $response, $can, $revalidates)
110  {
111  $didRevalidate = false;
112  $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')->getMockForAbstractClass();
113  $revalidate = $this->getMockBuilder('Guzzle\Plugin\Cache\DefaultRevalidation')
114  ->setMethods(array('revalidate'))
115  ->setConstructorArgs(array($storage))
116  ->getMockForAbstractClass();
117 
118  $revalidate->expects($this->any())
119  ->method('revalidate')
120  ->will($this->returnCallback(function () use (&$didRevalidate) {
121  $didRevalidate = true;
122  return true;
123  }));
124 
125  $plugin = new CachePlugin(array(
126  'storage' => $storage,
127  'revalidation' => $revalidate
128  ));
129 
130  $this->assertEquals($can, $plugin->canResponseSatisfyRequest($request, $response));
131  $this->assertEquals($didRevalidate, $revalidates);
132  }
133 
134  public function satisfyFailedProvider()
135  {
136  return array(
137  // Neither has stale-if-error
138  array(new Request('GET', 'http://foo.com', array()), new Response(200, array('Age' => 100)), false),
139  // Request has stale-if-error
140  array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'stale-if-error')), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50')), true),
141  // Request has valid stale-if-error
142  array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'stale-if-error=50')), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50')), true),
143  // Request has expired stale-if-error
144  array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'stale-if-error=20')), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50')), false),
145  // Response has permanent stale-if-error
146  array(new Request('GET', 'http://foo.com', array()), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50, stale-if-error', )), true),
147  // Response has valid stale-if-error
148  array(new Request('GET', 'http://foo.com', array()), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50, stale-if-error=50')), true),
149  // Response has expired stale-if-error
150  array(new Request('GET', 'http://foo.com', array()), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50, stale-if-error=20')), false),
151  // Request has valid stale-if-error but response does not
152  array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'stale-if-error=50')), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50, stale-if-error=20')), false),
153  // Response has valid stale-if-error but request does not
154  array(new Request('GET', 'http://foo.com', array('Cache-Control' => 'stale-if-error=20')), new Response(200, array('Age' => 100, 'Cache-Control' => 'max-age=50, stale-if-error=50')), false),
155  );
156  }
157 
161  public function testChecksIfResponseCanSatisfyFailedRequest($request, $response, $can)
162  {
163  $plugin = new CachePlugin();
164 
165  $this->assertEquals($can, $plugin->canResponseSatisfyFailedRequest($request, $response));
166  }
167 
169  {
170  $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')
171  ->setMethods(array('fetch'))
172  ->getMockForAbstractClass();
173  $storage->expects($this->never())->method('fetch');
174 
175  $plugin = new CachePlugin(array(
176  'storage' => $storage,
177  'can_cache' => new CallbackCanCacheStrategy(function () { return false; })
178  ));
179 
180  $plugin->onRequestBeforeSend(new Event(array(
181  'request' => new Request('GET', 'http://foo.com')
182  )));
183  }
184 
185  public function satisfiableProvider()
186  {
187  $date = new \DateTime('-10 seconds');
188 
189  return array(
190  // Fresh response
191  array(new Response(200, array(), 'foo')),
192  // Stale response
193  array(new Response(200, array('Date' => $date->format('c'), 'Cache-Control' => 'max-age=5'), 'foo'))
194  );
195  }
196 
200  public function testInjectsSatisfiableResponses($response)
201  {
202  $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')
203  ->setMethods(array('fetch'))
204  ->getMockForAbstractClass();
205 
206  $storage->expects($this->once())->method('fetch')->will($this->returnValue($response));
207  $plugin = new CachePlugin(array('storage' => $storage));
208  $request = new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-stale'));
209  $plugin->onRequestBeforeSend(new Event(array('request' => $request)));
210  $plugin->onRequestSent(new Event(array('request' => $request, 'response' => $request->getResponse())));
211  $this->assertEquals($response->getStatusCode(), $request->getResponse()->getStatusCode());
212  $this->assertEquals((string) $response->getBody(), (string) $request->getResponse()->getBody());
213  $this->assertTrue($request->getResponse()->hasHeader('Age'));
214  if ($request->getResponse()->isFresh() === false) {
215  $this->assertContains('110', (string) $request->getResponse()->getHeader('Warning'));
216  }
217  $this->assertSame(
218  sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION),
219  (string) $request->getHeader('Via')
220  );
221  $this->assertSame(
222  sprintf('%s GuzzleCache/%s',$request->getProtocolVersion(), Version::VERSION),
223  (string) $request->getResponse()->getHeader('Via')
224  );
225  $this->assertTrue($request->getParams()->get('cache.lookup'));
226  $this->assertTrue($request->getParams()->get('cache.hit'));
227  $this->assertTrue($request->getResponse()->hasHeader('X-Cache-Lookup'));
228  $this->assertTrue($request->getResponse()->hasHeader('X-Cache'));
229  $this->assertEquals('HIT from GuzzleCache', (string) $request->getResponse()->getHeader('X-Cache'));
230  $this->assertEquals('HIT from GuzzleCache', (string) $request->getResponse()->getHeader('X-Cache-Lookup'));
231  }
232 
233  public function satisfiableOnErrorProvider()
234  {
235  $date = new \DateTime('-10 seconds');
236  return array(
237  array(
238  new Response(200, array(
239  'Date' => $date->format('c'),
240  'Cache-Control' => 'max-age=5, stale-if-error'
241  ), 'foo'),
242  )
243  );
244  }
245 
249  public function testInjectsSatisfiableResponsesOnError($cacheResponse)
250  {
251  $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')
252  ->setMethods(array('fetch'))
253  ->getMockForAbstractClass();
254  $storage->expects($this->exactly(2))->method('fetch')->will($this->returnValue($cacheResponse));
255  $plugin = new CachePlugin(array('storage' => $storage));
256  $request = new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-stale'));
257  $plugin->onRequestBeforeSend(new Event(array('request' => $request)));
258  $plugin->onRequestError(
259  $event = new Event(array(
260  'request' => $request,
261  'response' => $request->getResponse(),
262  ))
263  );
264  $response = $event['response'];
265  $this->assertEquals($cacheResponse->getStatusCode(), $response->getStatusCode());
266  $this->assertEquals((string) $cacheResponse->getBody(), (string) $response->getBody());
267  $this->assertTrue($response->hasHeader('Age'));
268  if ($response->isFresh() === false) {
269  $this->assertContains('110', (string) $response->getHeader('Warning'));
270  }
271  $this->assertSame(sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION), (string) $request->getHeader('Via'));
272  $this->assertSame(sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION), (string) $response->getHeader('Via'));
273  $this->assertTrue($request->getParams()->get('cache.lookup'));
274  $this->assertSame('error', $request->getParams()->get('cache.hit'));
275  $this->assertTrue($response->hasHeader('X-Cache-Lookup'));
276  $this->assertTrue($response->hasHeader('X-Cache'));
277  $this->assertEquals('HIT from GuzzleCache', (string) $response->getHeader('X-Cache-Lookup'));
278  $this->assertEquals('HIT_ERROR from GuzzleCache', (string) $response->getHeader('X-Cache'));
279  }
280 
284  public function testInjectsSatisfiableResponsesOnException($cacheResponse)
285  {
286  $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')
287  ->setMethods(array('fetch'))
288  ->getMockForAbstractClass();
289  $storage->expects($this->exactly(2))->method('fetch')->will($this->returnValue($cacheResponse));
290  $plugin = new CachePlugin(array('storage' => $storage));
291  $request = new Request('GET', 'http://foo.com', array('Cache-Control' => 'max-stale'));
292  $plugin->onRequestBeforeSend(new Event(array(
293  'request' => $request
294  )));
295  $plugin->onRequestException(
296  new Event(array(
297  'request' => $request,
298  'response' => $request->getResponse(),
299  'exception' => $this->getMock('Guzzle\Http\Exception\CurlException'),
300  ))
301  );
302  $plugin->onRequestSent(
303  new Event(array(
304  'request' => $request,
305  'response' => $response = $request->getResponse(),
306  ))
307  );
308  $this->assertEquals($cacheResponse->getStatusCode(), $response->getStatusCode());
309  $this->assertEquals((string) $cacheResponse->getBody(), (string) $response->getBody());
310  $this->assertTrue($response->hasHeader('Age'));
311  if ($response->isFresh() === false) {
312  $this->assertContains('110', (string) $response->getHeader('Warning'));
313  }
314  $this->assertSame(sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION), (string) $request->getHeader('Via'));
315  $this->assertSame(sprintf('%s GuzzleCache/%s', $request->getProtocolVersion(), Version::VERSION), (string) $response->getHeader('Via'));
316  $this->assertTrue($request->getParams()->get('cache.lookup'));
317  $this->assertSame('error', $request->getParams()->get('cache.hit'));
318  $this->assertTrue($response->hasHeader('X-Cache-Lookup'));
319  $this->assertTrue($response->hasHeader('X-Cache'));
320  $this->assertEquals('HIT from GuzzleCache', (string) $response->getHeader('X-Cache-Lookup'));
321  $this->assertEquals('HIT_ERROR from GuzzleCache', (string) $response->getHeader('X-Cache'));
322  }
323 
325  {
326  $date = new \DateTime('-10 seconds');
327 
328  return array(
329  // no-store on request
330  array(
331  false,
332  array('Cache-Control' => 'no-store'),
333  new Response(200, array('Date' => $date->format('D, d M Y H:i:s T'), 'Cache-Control' => 'max-age=5, stale-if-error'), 'foo'),
334  ),
335  // request expired
336  array(
337  true,
338  array('Cache-Control' => 'stale-if-error=4'),
339  new Response(200, array('Date' => $date->format('D, d M Y H:i:s T'), 'Cache-Control' => 'max-age=5, stale-if-error'), 'foo'),
340  ),
341  // response expired
342  array(
343  true,
344  array('Cache-Control' => 'stale-if-error'),
345  new Response(200, array('Date' => $date->format('D, d M Y H:i:s T'), 'Cache-Control' => 'max-age=5, stale-if-error=4'), 'foo'),
346  ),
347  );
348  }
349 
353  public function testDoesNotInjectUnsatisfiableResponsesOnError($requestCanCache, $requestHeaders, $cacheResponse)
354  {
355  $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')
356  ->setMethods(array('fetch'))
357  ->getMockForAbstractClass();
358  $storage->expects($this->exactly($requestCanCache ? 2 : 0))->method('fetch')->will($this->returnValue($cacheResponse));
359  $plugin = new CachePlugin(array('storage' => $storage));
360  $request = new Request('GET', 'http://foo.com', $requestHeaders);
361  $plugin->onRequestBeforeSend(new Event(array(
362  'request' => $request
363  )));
364  $plugin->onRequestError(
365  $event = new Event(array(
366  'request' => $request,
367  'response' => $response = $request->getResponse(),
368  ))
369  );
370 
371  $this->assertSame($response, $event['response']);
372  }
373 
377  public function testDoesNotInjectUnsatisfiableResponsesOnException($requestCanCache, $requestHeaders, $responseParts)
378  {
379  $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')
380  ->setMethods(array('fetch'))
381  ->getMockForAbstractClass();
382  $storage->expects($this->exactly($requestCanCache ? 2 : 0))->method('fetch')->will($this->returnValue($responseParts));
383  $plugin = new CachePlugin(array('storage' => $storage));
384  $request = new Request('GET', 'http://foo.com', $requestHeaders);
385  $plugin->onRequestBeforeSend(new Event(array(
386  'request' => $request
387  )));
388  $plugin->onRequestException(
389  $event = new Event(array(
390  'request' => $request,
391  'response' => $response = $request->getResponse(),
392  'exception' => $this->getMock('Guzzle\Http\Exception\CurlException'),
393  ))
394  );
395 
396  $this->assertSame($response, $request->getResponse());
397  }
398 
400  {
401  $cache = new ArrayCache();
402  $plugin = new CachePlugin($cache);
403 
404  $request = new Request('GET', 'http://foo.com');
405  $response = new Response(200, array(), 'Foo');
406  $plugin->onRequestBeforeSend(new Event(array(
407  'request' => $request
408  )));
409  $plugin->onRequestSent(new Event(array(
410  'request' => $request,
411  'response' => $response
412  )));
413  $data = $this->readAttribute($cache, 'data');
414  $this->assertNotEmpty($data);
415  }
416 
417  public function testPurgesRequests()
418  {
419  $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')
420  ->setMethods(array('purge'))
421  ->getMockForAbstractClass();
422  $storage->expects($this->atLeastOnce())->method('purge');
423  $plugin = new CachePlugin(array('storage' => $storage));
424  $request = new Request('GET', 'http://foo.com', array('X-Foo' => 'Bar'));
425  $plugin->purge($request);
426  }
427 
428  public function testAutoPurgesRequests()
429  {
430  $storage = $this->getMockBuilder('Guzzle\Plugin\Cache\CacheStorageInterface')
431  ->setMethods(array('purge'))
432  ->getMockForAbstractClass();
433  $storage->expects($this->atLeastOnce())->method('purge');
434  $plugin = new CachePlugin(array('storage' => $storage, 'auto_purge' => true));
435  $client = new Client();
436  $request = $client->put('http://foo.com', array('X-Foo' => 'Bar'));
437  $request->addSubscriber($plugin);
438  $request->setResponse(new Response(200), true);
439  $request->send();
440  }
441 }
Guzzle\Tests\Plugin\Cache\CachePluginTest\satisfyProvider
satisfyProvider()
Definition: CachePluginTest.php:83
Guzzle\Tests\Plugin\Cache
Definition: CachePluginTest.php:3
Guzzle\Tests\Plugin\Cache\CachePluginTest\testAddsDefaultStorage
testAddsDefaultStorage()
Definition: CachePluginTest.php:23
Guzzle\Tests\Plugin\Cache\CachePluginTest\testCachesResponsesWhenCacheable
testCachesResponsesWhenCacheable()
Definition: CachePluginTest.php:399
Guzzle\Tests\Plugin\Cache\CachePluginTest\satisfiableOnErrorProvider
satisfiableOnErrorProvider()
Definition: CachePluginTest.php:233
Guzzle\Tests\Plugin\Cache\CachePluginTest\satisfyFailedProvider
satisfyFailedProvider()
Definition: CachePluginTest.php:134
Guzzle\Tests\GuzzleTestCase
Definition: GuzzleTestCase.php:22
Guzzle\Tests\Plugin\Cache\CachePluginTest
Definition: CachePluginTest.php:21
Guzzle\Tests\Plugin\Cache\CachePluginTest\testDoesNotInjectUnsatisfiableResponsesOnError
testDoesNotInjectUnsatisfiableResponsesOnError($requestCanCache, $requestHeaders, $cacheResponse)
Definition: CachePluginTest.php:353
Guzzle\Http\Message\Response
Definition: lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php:17
Guzzle\Tests\Plugin\Cache\CachePluginTest\testInjectsSatisfiableResponses
testInjectsSatisfiableResponses($response)
Definition: CachePluginTest.php:200
Guzzle\Plugin\Cache\DefaultCacheStorage
Definition: DefaultCacheStorage.php:16
Guzzle\Cache\DoctrineCacheAdapter
Definition: DoctrineCacheAdapter.php:12
Guzzle\Tests\Plugin\Cache\CachePluginTest\testInjectsSatisfiableResponsesOnError
testInjectsSatisfiableResponsesOnError($cacheResponse)
Definition: CachePluginTest.php:249
Guzzle\Common\Version\VERSION
const VERSION
Definition: Version.php:10
Guzzle\Tests\Plugin\Cache\CachePluginTest\testUsesCreatedCacheStorage
testUsesCreatedCacheStorage()
Definition: CachePluginTest.php:62
Guzzle\Common\Event
Definition: lib/vendor/guzzle/guzzle/src/Guzzle/Common/Event.php:10
Guzzle\Common\Version
Definition: Version.php:8
Guzzle\Http\Message\Request
Definition: lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Request.php:25
Guzzle\Tests\Plugin\Cache\CachePluginTest\testCanPassCacheAsOnlyArgumentToConstructor
testCanPassCacheAsOnlyArgumentToConstructor()
Definition: CachePluginTest.php:56
Guzzle\Tests\Plugin\Cache\CachePluginTest\testInjectsSatisfiableResponsesOnException
testInjectsSatisfiableResponsesOnException($cacheResponse)
Definition: CachePluginTest.php:284
Guzzle\Tests\Plugin\Cache\CachePluginTest\testDoesNotInjectUnsatisfiableResponsesOnException
testDoesNotInjectUnsatisfiableResponsesOnException($requestCanCache, $requestHeaders, $responseParts)
Definition: CachePluginTest.php:377
Guzzle\Plugin\Cache\CachePlugin\getSubscribedEvents
static getSubscribedEvents()
Definition: CachePlugin.php:100
Guzzle\Tests\Plugin\Cache\CachePluginTest\testAddsCallbackCollaborators
testAddsCallbackCollaborators()
Definition: CachePluginTest.php:46
Guzzle\Tests\Plugin\Cache\CachePluginTest\testDoesNothingWhenRequestIsNotCacheable
testDoesNothingWhenRequestIsNotCacheable()
Definition: CachePluginTest.php:168
Guzzle\Plugin\Cache\CallbackCanCacheStrategy
Definition: CallbackCanCacheStrategy.php:12
Guzzle\Tests\Plugin\Cache\CachePluginTest\testAddsDefaultCollaborators
testAddsDefaultCollaborators()
Definition: CachePluginTest.php:29
Guzzle\Tests\Plugin\Cache\CachePluginTest\testChecksIfResponseCanSatisfyFailedRequest
testChecksIfResponseCanSatisfyFailedRequest($request, $response, $can)
Definition: CachePluginTest.php:161
Guzzle\Http\Client
Definition: lib/vendor/guzzle/guzzle/src/Guzzle/Http/Client.php:24
Guzzle\Tests\Plugin\Cache\CachePluginTest\satisfiableProvider
satisfiableProvider()
Definition: CachePluginTest.php:185
Guzzle\Tests\Plugin\Cache\CachePluginTest\testUsesProvidedOptions
testUsesProvidedOptions()
Definition: CachePluginTest.php:70
Guzzle\Tests\Plugin\Cache\CachePluginTest\testAutoPurgesRequests
testAutoPurgesRequests()
Definition: CachePluginTest.php:428
Guzzle\Tests\Plugin\Cache\CachePluginTest\testPurgesRequests
testPurgesRequests()
Definition: CachePluginTest.php:417
Guzzle\Tests\Plugin\Cache\CachePluginTest\testChecksIfResponseCanSatisfyRequest
testChecksIfResponseCanSatisfyRequest($request, $response, $can, $revalidates)
Definition: CachePluginTest.php:109
Guzzle\Plugin\Cache\CachePlugin
Definition: CachePlugin.php:27
Guzzle\Tests\Plugin\Cache\CachePluginTest\unsatisfiableOnErrorProvider
unsatisfiableOnErrorProvider()
Definition: CachePluginTest.php:324