Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #50512 [VarDumper] Add named arguments coverage of VarDumper's …
…function (alexandre-daubois) This PR was merged into the 6.3 branch. Discussion ---------- [VarDumper] Add named arguments coverage of VarDumper's function | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | _NA_ | License | MIT | Doc PR | _NA_ Taking advantage of `.phpt` files added in 6.3 to add coverage on named arguments support of `dump` and `dd`. Commits ------- 2a29674 [VarDumper] Add named arguments coverage of VarDumper's function
- Loading branch information
Showing
4 changed files
with
50 additions
and
1 deletion.
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
16 changes: 16 additions & 0 deletions
16
src/Symfony/Component/VarDumper/Tests/Dumper/functions/dd_with_named_args.phpt
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" |
17 changes: 17 additions & 0 deletions
17
src/Symfony/Component/VarDumper/Tests/Dumper/functions/dump_with_named_args.phpt
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" |
16 changes: 16 additions & 0 deletions
16
src/Symfony/Component/VarDumper/Tests/Dumper/functions/dump_without_args.phpt
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-- | ||
🐛 |