You are here

public function AddRequestFormatsListenerTest::testSetAdditionalFormats 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::testSetAdditionalFormats()

File

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

Class

AddRequestFormatsListenerTest
Test AddRequestFormatsListener class.

Namespace

Symfony\Component\HttpKernel\Tests\EventListener

Code

public function testSetAdditionalFormats() {
  $request = $this
    ->getRequestMock();
  $event = $this
    ->getGetResponseEventMock($request);
  $request
    ->expects($this
    ->once())
    ->method('setFormat')
    ->with('csv', array(
    'text/csv',
    'text/plain',
  ));
  $this->listener
    ->onKernelRequest($event);
}