function PsrResponseSubscriberTest::testConvertsControllerResult

Same name and namespace in other branches
  1. 10 core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest::testConvertsControllerResult()
  2. 9 core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest::testConvertsControllerResult()
  3. 8.9.x core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest::testConvertsControllerResult()

Tests altering and finished event.

@legacy-covers ::onKernelView

File

core/tests/Drupal/Tests/Core/EventSubscriber/PsrResponseSubscriberTest.php, line 61

Class

PsrResponseSubscriberTest
Tests Drupal\Core\EventSubscriber\PsrResponseSubscriber.

Namespace

Drupal\Tests\Core\EventSubscriber

Code

public function testConvertsControllerResult() : void {
  $event = $this->createEvent($this->createMock('Psr\\Http\\Message\\ResponseInterface'));
  $this->psrResponseSubscriber
    ->onKernelView($event);
  $this->assertInstanceOf(Response::class, $event->getResponse());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.