function PsrResponseSubscriberTest::setUp
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest::setUp()
- 10 core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest::setUp()
- 11.x 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 35
Class
- PsrResponseSubscriberTest
- @coversDefaultClass \Drupal\Core\EventSubscriber\PsrResponseSubscriber @group EventSubscriber
Namespace
Drupal\Tests\Core\EventSubscriberCode
protected function setUp() : void {
$factory = $this->getMockBuilder('Symfony\\Bridge\\PsrHttpMessage\\HttpFoundationFactoryInterface')
->disableOriginalConstructor()
->getMock();
$factory->expects($this->any())
->method('createResponse')
->willReturn($this->createMock('Symfony\\Component\\HttpFoundation\\Response'));
$this->httpFoundationFactoryMock = $factory;
$this->psrResponseSubscriber = new PsrResponseSubscriber($this->httpFoundationFactoryMock);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.