diff --git a/src/Concerns/Testable.php b/src/Concerns/Testable.php index a6f78d25..b978139c 100644 --- a/src/Concerns/Testable.php +++ b/src/Concerns/Testable.php @@ -435,6 +435,11 @@ trait Testable if ($hasOutputExpectation) { ob_clean(); + + Closure::bind(function (): void { + $this->outputExpectedString = null; + $this->outputExpectedRegex = null; + }, $this, TestCase::class)(); } $this->setUp();