You are here

public function DumpDataCollectorTest::testCollectDefault in Zircon Profile 8

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

File

vendor/symfony/http-kernel/Tests/DataCollector/DumpDataCollectorTest.php, line 61

Class

DumpDataCollectorTest
@author Nicolas Grekas <p@tchwork.com>

Namespace

Symfony\Component\HttpKernel\Tests\DataCollector

Code

public function testCollectDefault() {
  $data = new Data(array(
    array(
      123,
    ),
  ));
  $collector = new DumpDataCollector();
  $collector
    ->dump($data);
  $line = __LINE__ - 1;
  ob_start();
  $collector
    ->collect(new Request(), new Response());
  $output = ob_get_clean();
  if (PHP_VERSION_ID >= 50400) {
    $this
      ->assertSame("DumpDataCollectorTest.php on line {$line}:\n123\n", $output);
  }
  else {
    $this
      ->assertSame("\"DumpDataCollectorTest.php on line {$line}:\"\n123\n", $output);
  }
  $this
    ->assertSame(1, $collector
    ->getDumpsCount());
  $collector
    ->serialize();
}