currentBeforeEachCall); self::$describing = $this->description; try { ($this->tests)(); } finally { self::$describing = null; } } /** * Dynamically calls methods on each test call. * * @param array $arguments */ public function __call(string $name, array $arguments): self { $filename = Backtrace::file(); if (! $this->currentBeforeEachCall instanceof \Pest\PendingCalls\BeforeEachCall) { $this->currentBeforeEachCall = new BeforeEachCall(TestSuite::getInstance(), $filename); $this->currentBeforeEachCall->describing = $this->description; } $this->currentBeforeEachCall->{$name}(...$arguments); // @phpstan-ignore-line return $this; } }