diff --git a/src/Functions.php b/src/Functions.php index 1e12fe7e..6a4f45ec 100644 --- a/src/Functions.php +++ b/src/Functions.php @@ -18,6 +18,7 @@ use Pest\Support\Backtrace; use Pest\Support\Container; use Pest\Support\DatasetInfo; +use Pest\Support\Description; use Pest\Support\HigherOrderTapProxy; use Pest\TestSuite; use PHPUnit\Framework\TestCase; @@ -95,7 +96,7 @@ function describe(string $description, Closure $tests): DescribeCall { $filename = Backtrace::testFile(); - return new DescribeCall(TestSuite::getInstance(), $filename, $description, $tests); + return new DescribeCall(TestSuite::getInstance(), $filename, new Description($description), $tests); } } diff --git a/src/PendingCalls/DescribeCall.php b/src/PendingCalls/DescribeCall.php index e6d4bc29..bf6a7f51 100644 --- a/src/PendingCalls/DescribeCall.php +++ b/src/PendingCalls/DescribeCall.php @@ -26,21 +26,16 @@ final class DescribeCall */ private ?BeforeEachCall $currentBeforeEachCall = null; - /** - * The unique description for this describe block - */ - private readonly Description $description; - /** * Creates a new Pending Call. */ public function __construct( public readonly TestSuite $testSuite, public readonly string $filename, - string $description, + public readonly Description $description, public readonly Closure $tests ) { - $this->description = new Description($description); + // } /**