Skip to content

Clean up the Test Double generator and runtime #1337

Clean up the Test Double generator and runtime

Clean up the Test Double generator and runtime #1337

Triggered via pull request April 27, 2024 06:25
Status Success
Total duration 4m 23s
Artifacts 1

ci.yaml

on: pull_request
Dependency Validation
11s
Dependency Validation
Coding Guidelines
51s
Coding Guidelines
Matrix: Unit Tests
Type Checker
26s
Type Checker
Matrix: End-to-End Tests
Build PHAR
26s
Build PHAR
Code Coverage
1m 19s
Code Coverage
Mutation Testing
36s
Mutation Testing
Matrix: Test PHAR
Fit to window
Zoom out
Zoom in

Annotations

3 warnings
Mutation Testing: src/Framework/MockObject/Runtime/ReturnValueGenerator.php#L207
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ private function testDoubleFor(string $type, string $className, string $methodName): Stub { try { - return (new Generator())->testDouble($type, false, [], [], '', false); + return (new Generator())->testDouble($type, true, [], [], '', false); } catch (Throwable $t) { throw new RuntimeException(sprintf('Return value for %s::%s() cannot be generated: %s', $className, $methodName, $t->getMessage())); }
Mutation Testing: src/Framework/MockObject/Runtime/ReturnValueGenerator.php#L207
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ private function testDoubleFor(string $type, string $className, string $methodName): Stub { try { - return (new Generator())->testDouble($type, false, [], [], '', false); + return (new Generator())->testDouble($type, false, [], [], '', true); } catch (Throwable $t) { throw new RuntimeException(sprintf('Return value for %s::%s() cannot be generated: %s', $className, $methodName, $t->getMessage())); }
Mutation Testing: src/Framework/TestCase.php#L743
Escaped Mutant for Mutator "PublicVisibility": --- Original +++ New @@ @@ /** * @internal This method is not covered by the backward compatibility promise for PHPUnit */ - final public function registerMockObject(MockObjectInternal $mockObject): void + final protected function registerMockObject(MockObjectInternal $mockObject): void { $this->mockObjects[] = $mockObject; }

Artifacts

Produced during runtime
Name Size
phpunit-snapshot-phar Expired
671 KB