From 3a907c886b1c58dbf1f4cf0efad76f9a5fa14fdd Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 4 Sep 2024 11:38:53 +0100 Subject: [PATCH] feat(mutate): requires it by default --- src/PendingCalls/TestCall.php | 9 ++------- tests/Arch.php | 1 + 2 files changed, 3 insertions(+), 7 deletions(-) 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',