Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
HttpPluginTest.php
Go to the documentation of this file.
1 <?php
8 
10 
11 class HttpPluginTest extends \PHPUnit\Framework\TestCase
12 {
19  public function testBeforeSendResponse($responseInstanceClass, $sendVaryCalled)
20  {
22  $responseMock = $this->createMock($responseInstanceClass);
23  $responseMock->expects($this->exactly($sendVaryCalled))
24  ->method('sendVary');
25  $plugin = new HttpPlugin();
26  $plugin->beforeSendResponse($responseMock);
27  }
28 
33  {
34  return [
35  [\Magento\Framework\App\Response\Http::class, 1],
36  [\Magento\MediaStorage\Model\File\Storage\Response::class, 0]
37  ];
38  }
39 }