mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
first
This commit is contained in:
24
tests/Unit/Console/Coverage.php
Normal file
24
tests/Unit/Console/Coverage.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Pest\Console\Coverage;
|
||||
|
||||
it('generates coverage based on file input', function () {
|
||||
assertEquals([
|
||||
'4..6', '102',
|
||||
], Coverage::getMissingCoverage(new class() {
|
||||
public function getCoverageData(): array
|
||||
{
|
||||
return [
|
||||
1 => ['foo'],
|
||||
2 => ['bar'],
|
||||
4 => [],
|
||||
5 => [],
|
||||
6 => [],
|
||||
7 => null,
|
||||
100 => null,
|
||||
101 => ['foo'],
|
||||
102 => [],
|
||||
];
|
||||
}
|
||||
}));
|
||||
});
|
||||
Reference in New Issue
Block a user