Skip to content

Commit 641f7c4

Browse files
[DebugBundle] add tests for twig and for the bundle
1 parent 09357c9 commit 641f7c4

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

VarDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ public static function dump($var)
3333
};
3434
}
3535

36-
return call_user_func(self::$handler, $h);
36+
return call_user_func(self::$handler, $var);
3737
}
3838

3939
public static function setHandler($callable)
4040
{
41-
if (!is_callable($callable, true)) {
41+
if (null !== $callable && !is_callable($callable, true)) {
4242
throw new \InvalidArgumentException('Invalid PHP callback.');
4343
}
4444

phpunit.xml.dist

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
5+
backupGlobals="false"
6+
colors="true"
7+
bootstrap="vendor/autoload.php"
8+
>
9+
10+
<testsuites>
11+
<testsuite name="Symfony VarDumper Component Test Suite">
12+
<directory>./Tests/</directory>
13+
</testsuite>
14+
</testsuites>
15+
16+
<filter>
17+
<whitelist>
18+
<directory>./</directory>
19+
<exclude>
20+
<directory>./Tests</directory>
21+
<directory>./Resources</directory>
22+
<directory>./vendor</directory>
23+
</exclude>
24+
</whitelist>
25+
</filter>
26+
</phpunit>

0 commit comments

Comments
 (0)