fix: stacktrace with nested with calls

This commit is contained in:
nuno maduro
2026-04-10 17:25:05 +01:00
parent bdf60cea91
commit 729f18a152
5 changed files with 349 additions and 4 deletions

View File

@ -74,7 +74,7 @@ final class DescribeCall
*/
public function __call(string $name, array $arguments): self
{
if (! $this->currentBeforeEachCall instanceof \Pest\PendingCalls\BeforeEachCall) {
if (! $this->currentBeforeEachCall instanceof BeforeEachCall) {
$this->currentBeforeEachCall = new BeforeEachCall(TestSuite::getInstance(), $this->filename);
$this->currentBeforeEachCall->describing = array_merge(