fix: before each globally

This commit is contained in:
Nuno Maduro
2024-07-03 22:15:11 +01:00
parent 29787d1ff1
commit 1c4bc8b1dc
4 changed files with 14 additions and 8 deletions

View File

@ -62,12 +62,17 @@ final class BeforeEachCall
$testCaseProxies = $this->testCaseProxies;
$beforeEachTestCall = function (TestCall $testCall) use ($describing): void {
if ($describing !== $this->describing) {
return;
}
if ($describing !== $testCall->describing) {
return;
if ($this->describing !== null) {
if ($describing !== $this->describing) {
return;
}
if ($describing !== $testCall->describing) {
return;
}
}
$this->testCallProxies->chain($testCall);
};