public function PsrResponseSubscriberTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ EventSubscriber/ PsrResponseSubscriberTest.php, line 36 - Contains \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest.
Class
- PsrResponseSubscriberTest
- @coversDefaultClass \Drupal\Core\EventSubscriber\PsrResponseSubscriber @group EventSubscriber
Namespace
Drupal\Tests\Core\EventSubscriberCode
public function setUp() {
$factory = $this
->getMock('Symfony\\Bridge\\PsrHttpMessage\\HttpFoundationFactoryInterface', [], [], '', NULL);
$factory
->expects($this
->any())
->method('createResponse')
->willReturn($this
->getMock('Symfony\\Component\\HttpFoundation\\Response'));
$this->httpFoundationFactoryMock = $factory;
$this->psrResponseSubscriber = new PsrResponseSubscriber($this->httpFoundationFactoryMock);
}