You are here

public function AbstractProfilerStorageTest::testStatusCode in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/Profiler/AbstractProfilerStorageTest.php \Symfony\Component\HttpKernel\Tests\Profiler\AbstractProfilerStorageTest::testStatusCode()

File

vendor/symfony/http-kernel/Tests/Profiler/AbstractProfilerStorageTest.php, line 250

Class

AbstractProfilerStorageTest

Namespace

Symfony\Component\HttpKernel\Tests\Profiler

Code

public function testStatusCode() {
  $profile = new Profile('token1');
  $profile
    ->setStatusCode(200);
  $this
    ->getStorage()
    ->write($profile);
  $profile = new Profile('token2');
  $profile
    ->setStatusCode(404);
  $this
    ->getStorage()
    ->write($profile);
  $tokens = $this
    ->getStorage()
    ->find('', '', 10, '');
  $this
    ->assertCount(2, $tokens);
  $this
    ->assertContains($tokens[0]['status_code'], array(
    200,
    404,
  ));
  $this
    ->assertContains($tokens[1]['status_code'], array(
    200,
    404,
  ));
}