Skip to content

Commit 0118e54

Browse files
Extract method
1 parent cf67b2a commit 0118e54

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/Framework/TestBuilder.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function build(ReflectionClass $theClass, string $methodName): Test
4040

4141
$data = null;
4242

43-
if ((new Requirements)->requirementsNotSatisfiedFor($className, $methodName) === []) {
43+
if ($this->requirementsSatisfied($className, $methodName)) {
4444
$data = (new DataProvider)->providedData($className, $methodName);
4545
}
4646

@@ -270,4 +270,13 @@ private function shouldAllTestMethodsOfTestClassBeRunInSingleSeparateProcess(str
270270
{
271271
return MetadataRegistry::parser()->forClass($className)->isRunClassInSeparateProcess()->isNotEmpty();
272272
}
273+
274+
/**
275+
* @psalm-param class-string $className
276+
* @psalm-param non-empty-string $methodName
277+
*/
278+
private function requirementsSatisfied(string $className, string $methodName): bool
279+
{
280+
return (new Requirements)->requirementsNotSatisfiedFor($className, $methodName) === [];
281+
}
273282
}

0 commit comments

Comments
 (0)