public function PsrResponseSubscriberTest::testConvertsControllerResult in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest::testConvertsControllerResult()
- 9 core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest::testConvertsControllerResult()
Tests altering and finished event.
@covers ::onKernelView
File
- core/
tests/ Drupal/ Tests/ Core/ EventSubscriber/ PsrResponseSubscriberTest.php, line 54
Class
- PsrResponseSubscriberTest
- @coversDefaultClass \Drupal\Core\EventSubscriber\PsrResponseSubscriber @group EventSubscriber
Namespace
Drupal\Tests\Core\EventSubscriberCode
public function testConvertsControllerResult() {
$event = $this
->createEvent($this
->createMock('Psr\\Http\\Message\\ResponseInterface'));
$this->psrResponseSubscriber
->onKernelView($event);
$this
->assertInstanceOf(Response::class, $event
->getResponse());
}