File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
tests/JakubOnderka/PhpVarDumpCheck Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Options for run
47
47
- ` --zend ` - check dump: ` Zend_Debug::dump ` , ` \Zend\Debug\Debug::dump `
48
48
- ` --doctrine ` - check dump: ` Doctrine::dump ` , ` \Doctrine\Common\Util\Debug::dump `
49
49
- ` --symfony ` - check dump: ` dump ` , ` VarDumper::dump ` , ` VarDumper::setHandler `
50
- - ` --laravel ` - check dump: ` dd `
50
+ - ` --laravel ` - check dump: ` dd ` , ` dump `
51
51
- ` --no-colors ` - disable colors from output
52
52
- ` --exclude folder/ ` - exclude * folder/* from check
53
53
- ` --extensions php,phpt,php7 ` - map file extensions for check
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ class Settings
25
25
SYMFONY_VARDUMPER_DUMP_SHORTCUT = 'dump ' ,
26
26
27
27
LARAVEL_DUMP_DD = 'dd ' ,
28
+ LARAVEL_DUMP = 'dump ' ,
28
29
29
30
DOCTRINE_DUMP = 'Doctrine::dump ' ,
30
31
DOCTRINE_DUMP_2 = '\Doctrine\Common\Util\Debug::dump ' ;
@@ -116,6 +117,7 @@ public static function parseArguments(array $arguments)
116
117
117
118
case '--laravel ' :
118
119
$ setting ->functionsToCheck [] = self ::LARAVEL_DUMP_DD ;
120
+ $ setting ->functionsToCheck [] = self ::LARAVEL_DUMP ;
119
121
break ;
120
122
121
123
case '--doctrine ' :
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ public function __construct()
12
12
$ settings = new PhpVarDumpCheck \Settings ();
13
13
$ settings ->functionsToCheck = array_merge ($ settings ->functionsToCheck , array (
14
14
PhpVarDumpCheck \Settings::LARAVEL_DUMP_DD ,
15
+ PhpVarDumpCheck \Settings::LARAVEL_DUMP ,
15
16
));
16
17
$ this ->uut = new PhpVarDumpCheck \Checker ($ settings );
17
18
}
@@ -22,6 +23,16 @@ public function testCheck_laravelDumpDd()
22
23
$ content = <<<PHP
23
24
<?php
24
25
dd( \$var);
26
+ PHP ;
27
+ $ result = $ this ->uut ->check ($ content );
28
+ $ this ->assertCount (1 , $ result );
29
+ }
30
+
31
+ public function testCheck_laravelDump ()
32
+ {
33
+ $ content = <<<PHP
34
+ <?php
35
+ dump( \$var);
25
36
PHP ;
26
37
$ result = $ this ->uut ->check ($ content );
27
38
$ this ->assertCount (1 , $ result );
You can’t perform that action at this time.
0 commit comments