Skip to content

Support doubling readonly classes #1189

Support doubling readonly classes

Support doubling readonly classes #1189

Triggered via pull request April 11, 2024 08:57
Status Success
Total duration 4m 23s
Artifacts 1

ci.yaml

on: pull_request
Dependency Validation
9s
Dependency Validation
Coding Guidelines
48s
Coding Guidelines
Matrix: Unit Tests
Type Checker
27s
Type Checker
Matrix: End-to-End Tests
Build PHAR
46s
Build PHAR
Code Coverage
1m 22s
Code Coverage
Mutation Testing
29s
Mutation Testing
Matrix: Test PHAR
Fit to window
Zoom out
Zoom in

Annotations

6 warnings
Mutation Testing: src/Framework/MockObject/Runtime/Api/MockObjectApi.php#L56
Escaped Mutant for Mutator "LogicalNot": --- Original +++ New @@ @@ $message = 'Expectations configured on test doubles that are created as test stubs are no longer verified since PHPUnit 10. Test doubles that are created as test stubs will no longer have the expects() method in PHPUnit 12. Update your test code to use createMock() instead of createStub(), for example.'; try { $test = TestMethodBuilder::fromCallStack(); - if (!$this->__phpunit_state()->wasDeprecationAlreadyEmittedFor($test->id())) { + if ($this->__phpunit_state()->wasDeprecationAlreadyEmittedFor($test->id())) { EventFacade::emitter()->testTriggeredPhpunitDeprecation($test, $message); $this->__phpunit_state()->deprecationWasEmittedFor($test->id()); }
Mutation Testing: src/Framework/MockObject/Runtime/Api/MockObjectApi.php#L62
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ $test = TestMethodBuilder::fromCallStack(); if (!$this->__phpunit_state()->wasDeprecationAlreadyEmittedFor($test->id())) { EventFacade::emitter()->testTriggeredPhpunitDeprecation($test, $message); - $this->__phpunit_state()->deprecationWasEmittedFor($test->id()); + } // @codeCoverageIgnoreStart } catch (NoTestCaseObjectOnCallStackException) {
Mutation Testing: src/Framework/MockObject/Runtime/Api/ProxiedCloneMethod.php#L19
Escaped Mutant for Mutator "CloneRemoval": --- Original +++ New @@ @@ { public function __clone(): void { - $this->__phpunit_state = clone $this->__phpunit_state; + $this->__phpunit_state = $this->__phpunit_state; $this->__phpunit_state()->cloneInvocationHandler(); parent::__clone(); } abstract public function __phpunit_state(): TestDoubleState; }
Mutation Testing: src/Framework/MockObject/Runtime/Api/ProxiedCloneMethod.php#L21
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ public function __clone(): void { $this->__phpunit_state = clone $this->__phpunit_state; - $this->__phpunit_state()->cloneInvocationHandler(); + parent::__clone(); } abstract public function __phpunit_state(): TestDoubleState; }
Mutation Testing: src/Framework/MockObject/Runtime/Api/StubApi.php#L33
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ /** @noinspection MagicMethodsValidityInspection */ public function __phpunit_unsetInvocationMocker(): void { - $this->__phpunit_state->unsetInvocationHandler(); + } }
Mutation Testing: src/Framework/MockObject/Runtime/Api/TestDoubleState.php#L80
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ } public function deprecationWasEmittedFor(string $testId): void { - self::$deprecationEmittedForTest[$testId] = true; + self::$deprecationEmittedForTest[$testId] = false; } public function wasDeprecationAlreadyEmittedFor(string $testId): bool {

Artifacts

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