Improve Identification of Samples in Coverage Report (#2153)
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"`.
This commit is contained in:
parent
9c2ce22505
commit
b98b9c761c
|
|
@ -63,7 +63,7 @@ class SampleTest extends TestCase
|
|||
// }
|
||||
if (!in_array($sample, $skipped)) {
|
||||
$file = 'samples/' . $sample;
|
||||
$result[] = [$file];
|
||||
$result[$sample] = [$file];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue