Commit 56576ab
committed
minor symfony#46717 [Yaml] Enhance coverage in yaml DumperTest. (donquixote)
This PR was submitted for the 6.2 branch but it was squashed and merged into the 4.4 branch instead.
Discussion
----------
[Yaml] Enhance coverage in yaml DumperTest.
| Q | A
| ------------- | ---
| Branch? | 6.1 or 6.2 TBD
| Bug fix? | no/TBD - it increases test coverage. Not really a bug, but also not a feature.
| New feature? | no
| Deprecations? | no
| Tickets | Fix symfony#46716
| License | MIT
| Doc PR | -
Currently the following mutation in Yaml would not cause test fail:
```diff
diff --git a/Dumper.php b/Dumper.php
index 56979c7..39dc925 100644
--- a/Dumper.php
+++ b/Dumper.php
@@ -124,6 +124,10 @@ public function dump(mixed $input, int $inline = 0, int $indent = 0, int $flags
$willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || empty($value);
+ if (!$willBeInlined && !$dumpAsMap) {
+ ++$indent;
+ }
+
$output .= sprintf('%s%s%s%s',
$prefix,
$dumpAsMap ? Inline::dump($key, $flags).':' : '-',
```
Commits
-------
c5834be [Yaml] Enhance coverage in yaml DumperTest.1 file changed
Lines changed: 30 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
110 | | - | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | | - | |
| 121 | + | |
120 | 122 | | |
121 | 123 | | |
122 | 124 | | |
| |||
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| 150 | + | |
| 151 | + | |
147 | 152 | | |
148 | 153 | | |
149 | 154 | | |
| |||
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
| 171 | + | |
| 172 | + | |
166 | 173 | | |
167 | 174 | | |
168 | 175 | | |
| |||
379 | 386 | | |
380 | 387 | | |
381 | 388 | | |
382 | | - | |
383 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
384 | 392 | | |
385 | 393 | | |
386 | 394 | | |
| |||
389 | 397 | | |
390 | 398 | | |
391 | 399 | | |
392 | | - | |
393 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
394 | 403 | | |
395 | 404 | | |
396 | 405 | | |
| |||
402 | 411 | | |
403 | 412 | | |
404 | 413 | | |
405 | | - | |
406 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
407 | 417 | | |
408 | 418 | | |
409 | 419 | | |
410 | 420 | | |
411 | 421 | | |
412 | 422 | | |
413 | 423 | | |
414 | | - | |
| 424 | + | |
415 | 425 | | |
416 | 426 | | |
417 | 427 | | |
| |||
423 | 433 | | |
424 | 434 | | |
425 | 435 | | |
426 | | - | |
427 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
428 | 439 | | |
429 | 440 | | |
430 | 441 | | |
| |||
433 | 444 | | |
434 | 445 | | |
435 | 446 | | |
436 | | - | |
437 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
438 | 450 | | |
439 | 451 | | |
440 | 452 | | |
| |||
446 | 458 | | |
447 | 459 | | |
448 | 460 | | |
449 | | - | |
450 | | - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
451 | 464 | | |
452 | 465 | | |
453 | 466 | | |
454 | 467 | | |
455 | 468 | | |
456 | 469 | | |
457 | 470 | | |
458 | | - | |
| 471 | + | |
459 | 472 | | |
460 | 473 | | |
461 | 474 | | |
| |||
0 commit comments