diff --git a/src/PendingCalls/TestCall.php b/src/PendingCalls/TestCall.php index bab8f0eb..c9b01f7a 100644 --- a/src/PendingCalls/TestCall.php +++ b/src/PendingCalls/TestCall.php @@ -636,14 +636,9 @@ final class TestCall /** * Mutates the test. */ - public function mutate(string $profile = 'default'): self|MutationTestCallDecorator // @phpstan-ignore-line + public function mutate(string $profile = 'default'): self|MutationTestCallDecorator { - if (class_exists(MutationTestCallDecorator::class)) { - return (new MutationTestCallDecorator($this)) - ->mutate($profile); - } - - return $this->__call('mutate', [$profile]); + return (new MutationTestCallDecorator($this))->mutate($profile); } /** diff --git a/tests/Arch.php b/tests/Arch.php index 0398416a..946bf71d 100644 --- a/tests/Arch.php +++ b/tests/Arch.php @@ -37,6 +37,7 @@ arch('dependencies') 'Termwind', 'ParaTest', 'Pest\Arch', + 'Pest\Mutate\Decorators\TestCallDecorator', 'Pest\Plugin', 'NunoMaduro\Collision', 'Whoops',