diff --git a/stubs/init-laravel/Pest.php.stub b/stubs/init-laravel/Pest.php.stub index 50ab1e43..60f04a45 100644 --- a/stubs/init-laravel/Pest.php.stub +++ b/stubs/init-laravel/Pest.php.stub @@ -7,14 +7,13 @@ | | The closure you provide to your test functions is always bound to a specific PHPUnit test | case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may -| need to change it using the "uses()" function to bind a different classes or traits. +| need to change it using the "pest()" function to bind a different classes or traits. | */ -uses( - Tests\TestCase::class, - // Illuminate\Foundation\Testing\RefreshDatabase::class, -)->in('Feature'); +pest()->extend(Tests\TestCase::class) + // ->use(Illuminate\Foundation\Testing\RefreshDatabase::class) + ->in('Feature'); /* |-------------------------------------------------------------------------- diff --git a/stubs/init/Pest.php.stub b/stubs/init/Pest.php.stub index 5949c617..fd279ada 100644 --- a/stubs/init/Pest.php.stub +++ b/stubs/init/Pest.php.stub @@ -7,11 +7,11 @@ | | The closure you provide to your test functions is always bound to a specific PHPUnit test | case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may -| need to change it using the "uses()" function to bind a different classes or traits. +| need to change it using the "pest()" function to bind a different classes or traits. | */ -// uses(Tests\TestCase::class)->in('Feature'); +// pest()->extend(Tests\TestCase::class)->in('Feature'); /* |-------------------------------------------------------------------------- diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index 4def52d9..f7c65b31 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -1402,7 +1402,7 @@ PASS Tests\Unit\Support\ExceptionTrace ✓ it ensures the given closures reports the correct class name - ✓ it ensures the given closures reports the correct class name and suggests the [uses()] function + ✓ it ensures the given closures reports the correct class name and suggests the [pest()] function PASS Tests\Unit\Support\HigherOrderMessage ✓ undefined method exceptions diff --git a/tests/Unit/Support/ExceptionTrace.php b/tests/Unit/Support/ExceptionTrace.php index 7bf01898..40464168 100644 --- a/tests/Unit/Support/ExceptionTrace.php +++ b/tests/Unit/Support/ExceptionTrace.php @@ -13,7 +13,7 @@ it('ensures the given closures reports the correct class name', function () { 'Call to undefined method Tests\IntentionallyNotExisting::testBasic().', ); -it('ensures the given closures reports the correct class name and suggests the [uses()] function', function () { +it('ensures the given closures reports the correct class name and suggests the [pest()] function', function () { $this->get(); })->throws( Error::class,