function PsrResponseSubscriberTest::createEvent
Same name in other branches
- 10 core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest::createEvent()
- 11.x core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest::createEvent()
Sets up an event that returns $controllerResult.
Parameters
mixed $controller_result: The return Object.
Return value
\Symfony\Component\HttpKernel\Event\ViewEvent A ViewEvent object to test.
2 calls to PsrResponseSubscriberTest::createEvent()
- PsrResponseSubscriberTest::testConvertsControllerResult in core/
tests/ Drupal/ Tests/ Core/ EventSubscriber/ PsrResponseSubscriberTest.php - Tests altering and finished event.
- PsrResponseSubscriberTest::testDoesNotConvertControllerResult in core/
tests/ Drupal/ Tests/ Core/ EventSubscriber/ PsrResponseSubscriberTest.php - Tests altering and finished event.
File
-
core/
tests/ Drupal/ Tests/ Core/ EventSubscriber/ PsrResponseSubscriberTest.php, line 84
Class
- PsrResponseSubscriberTest
- @coversDefaultClass \Drupal\Core\EventSubscriber\PsrResponseSubscriber @group EventSubscriber
Namespace
Drupal\Tests\Core\EventSubscriberCode
protected function createEvent($controller_result) {
return new ViewEvent($this->createMock(HttpKernelInterface::class), $this->createMock(Request::class), HttpKernelInterface::MASTER_REQUEST, $controller_result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.