You are here

public function RequestTest::testFactory in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/RequestTest.php \Symfony\Component\HttpFoundation\Tests\RequestTest::testFactory()

File

vendor/symfony/http-foundation/Tests/RequestTest.php, line 1811

Class

RequestTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testFactory() {
  Request::setFactory(function (array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) {
    return new NewRequest();
  });
  $this
    ->assertEquals('foo', Request::create('/')
    ->getFoo());
  Request::setFactory(null);
}