Add exculde verbosity test

This commit is contained in:
Dany Maillard 2017-07-11 00:31:46 +02:00
parent 9b8d96b845
commit e53508986a

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\VarDumper\Tests\Caster;
use PHPUnit\Framework\TestCase;
use Symfony\Component\VarDumper\Caster\Caster;
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
use Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo;
use Symfony\Component\VarDumper\Tests\Fixtures\NotLoadableClass;
@ -77,13 +78,27 @@ Closure {
\$b: & 123
}
file: "%sReflectionCasterTest.php"
line: "67 to 67"
line: "68 to 68"
}
EOTXT
, $var
);
}
public function testClosureCasterExcludingVerbosity()
{
$var = function () {};
$expectedDump = <<<EOTXT
Closure {
class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest"
this: Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest { }
}
EOTXT;
$this->assertDumpEquals($expectedDump, $var, Caster::EXCLUDE_VERBOSE);
}
public function testReflectionParameter()
{
$var = new \ReflectionParameter(__NAMESPACE__.'\reflectionParameterFixture', 0);