Skip to content

Commit

Permalink
Improve Identification of Samples in Coverage Report (#2153)
Browse files Browse the repository at this point in the history
The Phpunit coverage report currently contains bullet items like `PhpOffice\PhpSpreadsheetTests\Helper\SampleTest\testSample with data set "49"`. This extremely simple change takes advantage of Phpunit's ability to accept an array with keys which are either strings or integers, by using the sample filenames as the array keys rather than sequential but otherwise meaningless integers (e.g. `49` in the earlier cited item). The bullet item will now read `PhpOffice\PhpSpreadsheetTests\Helper\SampleTest\testSample with data set "Basic/38_Clone_worksheet.php"`.
  • Loading branch information
oleibman authored Jun 11, 2021
1 parent 9c2ce22 commit b98b9c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/PhpSpreadsheetTests/Helper/SampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function providerSample(): array
// }
if (!in_array($sample, $skipped)) {
$file = 'samples/' . $sample;
$result[] = [$file];
$result[$sample] = [$file];
}
}
}
Expand Down

0 comments on commit b98b9c7

Please sign in to comment.