Skip to content

Commit 8093245

Browse files
authored
uses pest 3 (#1531)
1 parent 39cbf36 commit 8093245

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/Console/InstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function handle()
115115
$this->removeComposerDevPackages(['phpunit/phpunit']);
116116
}
117117

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

stubs/pest-tests/Pest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
<?php
22

3-
use Illuminate\Foundation\Testing\RefreshDatabase;
4-
use Tests\TestCase;
5-
63
/*
74
|--------------------------------------------------------------------------
85
| Test Case
96
|--------------------------------------------------------------------------
107
|
118
| The closure you provide to your test functions is always bound to a specific PHPUnit test
129
| case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may
13-
| need to change it using the "uses()" function to bind a different classes or traits.
10+
| need to change it using the "pest()" function to bind a different classes or traits.
1411
|
1512
*/
1613

17-
uses(TestCase::class, RefreshDatabase::class)->in('Feature');
14+
pest()->extend(Tests\TestCase::class)
15+
->use(Illuminate\Foundation\Testing\RefreshDatabase::class)
16+
->in('Feature');
1817

1918
/*
2019
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)