Commit bec67ed
test: kill LogicalOrAllSubExprNegation mutation in ServerRequest
Add test to kill the LogicalOrAllSubExprNegation mutation on line 158
of ServerRequest::withParsedBody(). The mutation changes the condition
from `is_array($data) || is_object($data)` to `!is_array($data) ||
!is_object($data)`, which would incorrectly enter the params-setting
block for null values.
Also enable failOnWarning in phpunit.xml.dist to ensure PHP warnings
(like foreach on null) fail tests, which is necessary for this mutation
to be detected.1 parent 79e46f1 commit bec67ed
File tree
2 files changed
+39
-1
lines changed- tests/src/Unit/Adapter/Psr7
2 files changed
+39
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
622 | 660 | | |
0 commit comments