Skip to content

Commit

Permalink
uses pest 3 (#1531)
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro authored Sep 9, 2024
1 parent 39cbf36 commit 8093245
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function handle()
$this->removeComposerDevPackages(['phpunit/phpunit']);
}

if (! $this->requireComposerDevPackages(['pestphp/pest:^2.0', 'pestphp/pest-plugin-laravel:^2.0'])) {
if (! $this->requireComposerDevPackages(['pestphp/pest', 'pestphp/pest-plugin-laravel'])) {
return 1;
}

Expand Down
9 changes: 4 additions & 5 deletions stubs/pest-tests/Pest.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?php

use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

/*
|--------------------------------------------------------------------------
| Test Case
|--------------------------------------------------------------------------
|
| 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(TestCase::class, RefreshDatabase::class)->in('Feature');
pest()->extend(Tests\TestCase::class)
->use(Illuminate\Foundation\Testing\RefreshDatabase::class)
->in('Feature');

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 8093245

Please sign in to comment.