Skip to content

Commit cf67b2a

Browse files
Extract method
1 parent e2ec97c commit cf67b2a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Framework/TestCase.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ final public function run(): void
513513
return;
514514
}
515515

516-
if (!$this->shouldRunInSeparateProcess() || (new Requirements)->requirementsNotSatisfiedFor(static::class, $this->name) !== []) {
516+
if (!$this->shouldRunInSeparateProcess() || $this->requirementsNotSatisfied()) {
517517
(new TestRunner)->run($this);
518518
} else {
519519
(new TestRunner)->runInSeparateProcess(
@@ -2310,6 +2310,11 @@ private function hasExpectationOnOutput(): bool
23102310
return is_string($this->outputExpectedString) || is_string($this->outputExpectedRegex);
23112311
}
23122312

2313+
private function requirementsNotSatisfied(): bool
2314+
{
2315+
return (new Requirements)->requirementsNotSatisfiedFor(static::class, $this->name) !== [];
2316+
}
2317+
23132318
/**
23142319
* Creates a test stub for the specified interface or class.
23152320
*

0 commit comments

Comments
 (0)