public function ProfilerTest::testCollect in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php \Symfony\Component\HttpKernel\Tests\Profiler\ProfilerTest::testCollect()
File
- vendor/
symfony/ http-kernel/ Tests/ Profiler/ ProfilerTest.php, line 25
Class
Namespace
Symfony\Component\HttpKernel\Tests\ProfilerCode
public function testCollect() {
$request = new Request();
$request->query
->set('foo', 'bar');
$response = new Response('', 204);
$collector = new RequestDataCollector();
$profiler = new Profiler($this->storage);
$profiler
->add($collector);
$profile = $profiler
->collect($request, $response);
$this
->assertSame(204, $profile
->getStatusCode());
$this
->assertSame('GET', $profile
->getMethod());
$this
->assertEquals(array(
'foo' => 'bar',
), $profiler
->get('request')
->getRequestQuery()
->all());
}