public function AbstractProfilerStorageTest::testRetrieveByMethodAndLimit

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/AbstractProfilerStorageTest.php, line 192

Class

AbstractProfilerStorageTest

Namespace

Symfony\Component\HttpKernel\Tests\Profiler

Code

public function testRetrieveByMethodAndLimit() {
  foreach (array(
    'POST',
    'GET',
  ) as $method) {
    for ($i = 0; $i < 5; $i++) {
      $profile = new Profile('token_' . $i . $method);
      $profile
        ->setMethod($method);
      $this
        ->getStorage()
        ->write($profile);
    }
  }
  $this
    ->assertCount(5, $this
    ->getStorage()
    ->find('', '', 5, 'POST'));
  $this
    ->getStorage()
    ->purge();
}