You are here

public function PsrResponseSubscriberTest::testConvertsControllerResult in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 53
Contains \Drupal\Tests\Core\EventSubscriber\PsrResponseSubscriberTest.

Class

PsrResponseSubscriberTest
@coversDefaultClass \Drupal\Core\EventSubscriber\PsrResponseSubscriber @group EventSubscriber

Namespace

Drupal\Tests\Core\EventSubscriber

Code

public function testConvertsControllerResult() {
  $event = $this
    ->createEventMock($this
    ->getMock('Psr\\Http\\Message\\ResponseInterface'));
  $event
    ->expects($this
    ->once())
    ->method('setResponse')
    ->with($this
    ->isInstanceOf('Symfony\\Component\\HttpFoundation\\Response'));
  $this->psrResponseSubscriber
    ->onKernelView($event);
}