From 8d24b4a217f9421257c08ddff86bd639fe516697 Mon Sep 17 00:00:00 2001 From: jordanbrauer <18744334+jordanbrauer@users.noreply.github.com> Date: Tue, 27 Jul 2021 23:39:26 -0500 Subject: [PATCH] chore: replace prop set/check with method call --- src/Factories/TestCaseFactory.php | 10 ++-------- src/PendingObjects/TestCall.php | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Factories/TestCaseFactory.php b/src/Factories/TestCaseFactory.php index e849f95e..bc75f5c1 100644 --- a/src/Factories/TestCaseFactory.php +++ b/src/Factories/TestCaseFactory.php @@ -66,13 +66,6 @@ final class TestCaseFactory */ public $datasets = []; - /** - * Has the current test been marked dependent on others? - * - * @var bool - */ - public $dependent = false; - /** * The FQN of the test case class. * @@ -241,6 +234,7 @@ final class TestCaseFactory */ public function receivesArguments(): bool { - return $this->dependent === true || count($this->datasets) > 0; + return count($this->datasets) > 0 + || $this->factoryProxies->count('addDependencies') > 0; } } diff --git a/src/PendingObjects/TestCall.php b/src/PendingObjects/TestCall.php index d97f1ac2..be839bff 100644 --- a/src/PendingObjects/TestCall.php +++ b/src/PendingObjects/TestCall.php @@ -102,8 +102,6 @@ final class TestCall ->factoryProxies ->add(Backtrace::file(), Backtrace::line(), 'addDependencies', [$tests]); - $this->testCaseFactory->dependent = true; - return $this; }