Skip to content

Commit 9039dc6

Browse files
Parsing no longer crashes (at least not as before)
1 parent a50f621 commit 9039dc6

File tree

4 files changed

+0
-40
lines changed

4 files changed

+0
-40
lines changed

tests/TestCase.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,28 +1556,6 @@ protected function setUpXdebugStubForClassWithAnonymousFunction(): Driver
15561556
return $stub;
15571557
}
15581558

1559-
protected function getCoverageForCrashParsing(): CodeCoverage
1560-
{
1561-
$filter = new Filter;
1562-
$filter->includeFile(TEST_FILES_PATH . 'Crash.php');
1563-
1564-
// This is a file with invalid syntax, so it isn't executed.
1565-
return new CodeCoverage(
1566-
$this->setUpXdebugStubForCrashParsing(),
1567-
$filter
1568-
);
1569-
}
1570-
1571-
protected function setUpXdebugStubForCrashParsing(): Driver
1572-
{
1573-
$stub = $this->createStub(Driver::class);
1574-
1575-
$stub->method('stop')
1576-
->willReturn(RawCodeCoverageData::fromXdebugWithoutPathCoverage([]));
1577-
1578-
return $stub;
1579-
}
1580-
15811559
protected function removeTemporaryFiles(): void
15821560
{
15831561
$tmpFilesIterator = new RecursiveIteratorIterator(

tests/_files/Crash.php

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/tests/BuilderTest.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -148,21 +148,6 @@ public function testSomething(): void
148148
$this->assertEquals([], $root->functions());
149149
}
150150

151-
public function testNotCrashParsing(): void
152-
{
153-
$coverage = $this->getCoverageForCrashParsing();
154-
$root = $coverage->getReport();
155-
156-
$expectedPath = rtrim(TEST_FILES_PATH, DIRECTORY_SEPARATOR);
157-
$this->assertEquals($expectedPath, $root->name());
158-
$this->assertEquals($expectedPath, $root->pathAsString());
159-
$this->assertEquals(1, $root->numberOfExecutableLines());
160-
$this->assertEquals(0, $root->numberOfExecutedLines());
161-
$data = $coverage->getData()->lineCoverage();
162-
$expectedFile = $expectedPath . DIRECTORY_SEPARATOR . 'Crash.php';
163-
$this->assertSame([$expectedFile => [1 => []]], $data);
164-
}
165-
166151
public function testBuildDirectoryStructure(): void
167152
{
168153
$s = DIRECTORY_SEPARATOR;

tests/tests/FilterTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ protected function setUp(): void
5656
TEST_FILES_PATH . 'CoverageTwoDefaultClassAnnotations.php',
5757
TEST_FILES_PATH . 'CoveredClass.php',
5858
TEST_FILES_PATH . 'CoveredFunction.php',
59-
TEST_FILES_PATH . 'Crash.php',
6059
TEST_FILES_PATH . 'NamespaceCoverageClassExtendedTest.php',
6160
TEST_FILES_PATH . 'NamespaceCoverageClassTest.php',
6261
TEST_FILES_PATH . 'NamespaceCoverageCoversClassPublicTest.php',

0 commit comments

Comments
 (0)