-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VarDumper] Add named arguments coverage of VarDumper's function
- Loading branch information
1 parent
36579a1
commit 90caf9f
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--TEST-- | ||
Test dd() with named args show label | ||
--FILE-- | ||
<?php | ||
putenv('NO_COLOR=1'); | ||
|
||
$vendor = __DIR__; | ||
while (!file_exists($vendor.'/vendor')) { | ||
$vendor = \dirname($vendor); | ||
} | ||
require $vendor.'/vendor/autoload.php'; | ||
|
||
dd(label2: "dd() with label"); | ||
|
||
--EXPECT-- | ||
label2 "dd() with label" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--TEST-- | ||
Test dd() with named args show label | ||
--FILE-- | ||
<?php | ||
putenv('NO_COLOR=1'); | ||
|
||
$vendor = __DIR__; | ||
while (!file_exists($vendor.'/vendor')) { | ||
$vendor = \dirname($vendor); | ||
} | ||
require $vendor.'/vendor/autoload.php'; | ||
|
||
dump("first dump", label1: "dump() with label"); | ||
|
||
--EXPECT-- | ||
1 "first dump" | ||
label1 "dump() with label" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--TEST-- | ||
Test dd() without args displays debug hint | ||
--FILE-- | ||
<?php | ||
putenv('NO_COLOR=1'); | ||
|
||
$vendor = __DIR__; | ||
while (!file_exists($vendor.'/vendor')) { | ||
$vendor = \dirname($vendor); | ||
} | ||
require $vendor.'/vendor/autoload.php'; | ||
|
||
dump(); | ||
|
||
--EXPECT-- | ||
🐛 |