You are here

protected function RequestDataCollectorTest::createResponse in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php \Symfony\Component\HttpKernel\Tests\DataCollector\RequestDataCollectorTest::createResponse()
2 calls to RequestDataCollectorTest::createResponse()
RequestDataCollectorTest::testCollect in vendor/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php
RequestDataCollectorTest::testControllerInspection in vendor/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php
Test various types of controller callables.

File

vendor/symfony/http-kernel/Tests/DataCollector/RequestDataCollectorTest.php, line 171

Class

RequestDataCollectorTest

Namespace

Symfony\Component\HttpKernel\Tests\DataCollector

Code

protected function createResponse() {
  $response = new Response();
  $response
    ->setStatusCode(200);
  $response->headers
    ->set('Content-Type', 'application/json');
  $response->headers
    ->setCookie(new Cookie('foo', 'bar', 1, '/foo', 'localhost', true, true));
  $response->headers
    ->setCookie(new Cookie('bar', 'foo', new \DateTime('@946684800')));
  $response->headers
    ->setCookie(new Cookie('bazz', 'foo', '2000-12-12'));
  return $response;
}