Skip to content

Commit

Permalink
minor #50512 [VarDumper] Add named arguments coverage of VarDumper's …
Browse files Browse the repository at this point in the history
…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
nicolas-grekas committed Jun 1, 2023
2 parents 2e688f7 + 2a29674 commit 96c2dd7
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG-6.3.md
Expand Up @@ -203,7 +203,7 @@ To get the diff between two versions, go to https://github.com/symfony/symfony/c
* feature #48678 [FrameworkBundle] Rename service `notifier.logger_notification_listener` to `notifier.notification_logger_listener` (ker0x)
* feature #48516 [PhpUnitBridge] Add `enum_exists` mock (alexandre-daubois)
* feature #48855 [Notifier] Add new Symfony Notifier for PagerDuty (stloyd)
* feature #48876 [HttpKernel] Rename HttpStatus atribute to WithHttpStatus (fabpot)
* feature #48876 [HttpKernel] Rename HttpStatus attribute to WithHttpStatus (fabpot)
* feature #48797 [FrameworkBundle] Add `extra` attribute for HttpClient Configuration (voodooism)
* feature #48747 [HttpKernel] Allow using `#[WithLogLevel]` for setting custom log level for exceptions (angelov)
* feature #48820 [HttpFoundation] ParameterBag::getEnum() (nikophil)
Expand Down
@@ -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"
@@ -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"
@@ -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 96c2dd7

Please sign in to comment.