Skip to content

Commit

Permalink
* Added internal tag
Browse files Browse the repository at this point in the history
* Test displaying place in code
  • Loading branch information
bkrukowski committed Jan 18, 2017
1 parent 0d43553 commit 380d08b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/DumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Awesomite\VarDumper;

/**
* @internal
*/
class DumperTest extends BaseTestCase
{
/**
Expand Down
35 changes: 35 additions & 0 deletions tests/FileLineTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace Awesomite\VarDumper;

/**
* @internal
*/
class FileLineTest extends BaseTestCase
{
/**
* @dataProvider providerDumpers
*
* @param VarDumperInterface $dumper
* @param bool $displayLines
*/
public function testFileLine(VarDumperInterface $dumper, $displayLines)
{
ob_start();
$dumper->dump(1);
$contents = ob_get_contents();
ob_end_clean();
list($firstLine) = explode("\n", $contents);
$this->assertSame($displayLines, __FILE__ . ':' . (__LINE__ - 4) . ':' === $firstLine, $contents);
}

public function providerDumpers()
{
return array(
array(new LightVarDumper(true), true),
array(new InternalVarDumper(true), true),
array(new LightVarDumper(), false),
array(new InternalVarDumper(), false),
);
}
}

0 comments on commit 380d08b

Please sign in to comment.