You are here

protected function AddRequestFormatsListenerTest::getGetResponseEventMock in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php \Symfony\Component\HttpKernel\Tests\EventListener\AddRequestFormatsListenerTest::getGetResponseEventMock()
1 call to AddRequestFormatsListenerTest::getGetResponseEventMock()
AddRequestFormatsListenerTest::testSetAdditionalFormats in vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php

File

vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php, line 70

Class

AddRequestFormatsListenerTest
Test AddRequestFormatsListener class.

Namespace

Symfony\Component\HttpKernel\Tests\EventListener

Code

protected function getGetResponseEventMock(Request $request) {
  $event = $this
    ->getMockBuilder('Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent')
    ->disableOriginalConstructor()
    ->getMock();
  $event
    ->expects($this
    ->any())
    ->method('getRequest')
    ->will($this
    ->returnValue($request));
  return $event;
}