Skip to content

Commit

Permalink
Implemented testContentIsDispatched
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Knap committed Oct 5, 2016
1 parent 6f441dd commit 22efacb
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tests/helpers/TracyWrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,23 @@ public function dataAssetIsDispatched()
*/
public function testContentIsDispatched()
{
$this->markTestSkipped();
session_start();
Debugger::enable(true);
ob_start();
/** @noinspection PhpMethodParametersCountMismatchInspection */
tracy_wrap($this->renderer, [], null);
$content = ob_get_contents();
ob_end_clean();
preg_match('/content(-ajax)?.(\w+)/', $content, $m);
$_GET['_tracy_bar'] = "content.{$m[2]}{$m[1]}";

ob_start();
/** @noinspection PhpMethodParametersCountMismatchInspection */
tracy_wrap($this->renderer, [], null);
$content = ob_get_contents();
ob_end_clean();

$this->assertContains("Tracy.Debug.init(", $content);
}

/**
Expand Down

0 comments on commit 22efacb

Please sign in to comment.