From bfd351783ea6b87f1b4e892209e881fda5db27ec Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Thu, 5 Sep 2024 22:41:26 +0100 Subject: [PATCH] wip --- src/Functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Functions.php b/src/Functions.php index a1aeb865..65ce62d0 100644 --- a/src/Functions.php +++ b/src/Functions.php @@ -8,6 +8,7 @@ use Pest\Exceptions\AfterAllWithinDescribe; use Pest\Exceptions\BeforeAllWithinDescribe; use Pest\Expectation; use Pest\Mutate\Contracts\MutationTestRunner; +use Pest\Mutate\Repositories\ConfigurationRepository; use Pest\PendingCalls\AfterEachCall; use Pest\PendingCalls\BeforeEachCall; use Pest\PendingCalls\DescribeCall; @@ -231,8 +232,11 @@ if (! function_exists('covers')) { /** @var MutationTestRunner $runner */ $runner = Container::getInstance()->get(MutationTestRunner::class); + /** @var \Pest\Mutate\Repositories\ConfigurationRepository $configurationRepository */ + $configurationRepository = Container::getInstance()->get(ConfigurationRepository::class); + $configuration = $configurationRepository->mergedConfiguration(); - if ($runner->isEnabled()) { + if ($runner->isEnabled() && ! $configuration->everything) { $beforeEachCall->only('__pest_mutate_only'); } }