File tree 1 file changed +16
-1
lines changed
src/Symfony/Component/VarDumper/Tests/Caster
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \VarDumper \Tests \Caster ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Component \VarDumper \Caster \Caster ;
15
16
use Symfony \Component \VarDumper \Test \VarDumperTestTrait ;
16
17
use Symfony \Component \VarDumper \Tests \Fixtures \GeneratorDemo ;
17
18
use Symfony \Component \VarDumper \Tests \Fixtures \NotLoadableClass ;
@@ -77,13 +78,27 @@ public function testClosureCaster()
77
78
\$b: & 123
78
79
}
79
80
file: "%sReflectionCasterTest.php"
80
- line: "67 to 67 "
81
+ line: "68 to 68 "
81
82
}
82
83
EOTXT
83
84
, $ var
84
85
);
85
86
}
86
87
88
+ public function testClosureCasterExcludingVerbosity ()
89
+ {
90
+ $ var = function () {};
91
+
92
+ $ expectedDump = <<<EOTXT
93
+ Closure {
94
+ class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest"
95
+ this: Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest { …}
96
+ }
97
+ EOTXT ;
98
+
99
+ $ this ->assertDumpEquals ($ expectedDump , $ var , Caster::EXCLUDE_VERBOSE );
100
+ }
101
+
87
102
public function testReflectionParameter ()
88
103
{
89
104
$ var = new \ReflectionParameter (__NAMESPACE__ .'\reflectionParameterFixture ' , 0 );
You can’t perform that action at this time.
0 commit comments