Clean up the Test Double generator and runtime #1335
ci.yaml
on: pull_request
Dependency Validation
11s
Coding Guidelines
47s
Matrix: Unit Tests
Type Checker
27s
Matrix: End-to-End Tests
Matrix: Test PHAR
Annotations
1 error and 3 warnings
Coding Guidelines
Process completed with exit code 8.
|
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 |
|