Commit f31a26f
authored
[TASK] Trigger assertion in assertCSVDataSet() on empty table (#653)
When comparing with a csv fixture that contains a table
with no rows, which is a legit case, no assertion is
raised. This makes phpunit emit a risky test: "This test
did not perform any assertions". The patch adds an
assertion in this case as well.
Note phpunit nowadays has attribute #[DoesNotPerformAssertions]
to mark tests that do not assert anything. This can be used
for tests that for instance just call a subject method to verify
no exception is raised. It is good to follow this path, the
patch removes "beStrictAboutTestsThatDoNotTestAnything=false"
from the example phpunit xml files, which makes this setting
implicitly true.
Releases: main
Resolves: #6471 parent ae48808 commit f31a26f
File tree
4 files changed
+4
-3
lines changed- Build/phpunit
- Classes/Core/Functional
- Resources/Core/Build
4 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
618 | 622 | | |
619 | 623 | | |
620 | 624 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
0 commit comments