Skip to content

Commit

Permalink
[VarDumper] Add named arguments coverage of VarDumper's function
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Jun 1, 2023
1 parent 36579a1 commit 90caf9f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Tests/Dumper/functions/dd_with_named_args.phpt
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 Tests/Dumper/functions/dump_with_named_args.phpt
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 Tests/Dumper/functions/dump_without_args.phpt
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--
🐛

0 comments on commit 90caf9f

Please sign in to comment.