Add exculde verbosity test
This commit is contained in:
parent
9b8d96b845
commit
e53508986a
@ -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);
|
||||
|
Reference in New Issue
Block a user