Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e1a7b2e

Browse files
Adjusts docs for pest v4 (#10756)
1 parent c6de290 commit e1a7b2e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

‎console-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ By default, the `Illuminate\Console\Events\CommandStarting` and `Illuminate\Cons
203203

204204
use Illuminate\Foundation\Testing\WithConsoleEvents;
205205

206-
uses(WithConsoleEvents::class);
206+
pest()->use(WithConsoleEvents::class);
207207

208208
// ...
209209
```

‎database-testing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Before proceeding much further, let's discuss how to reset your database after e
2121

2222
use Illuminate\Foundation\Testing\RefreshDatabase;
2323

24-
uses(RefreshDatabase::class);
24+
pest()->use(RefreshDatabase::class);
2525

2626
test('basic example', function () {
2727
$response = $this->get('/');
@@ -98,7 +98,7 @@ use Database\Seeders\OrderStatusSeeder;
9898
use Database\Seeders\TransactionStatusSeeder;
9999
use Illuminate\Foundation\Testing\RefreshDatabase;
100100

101-
uses(RefreshDatabase::class);
101+
pest()->use(RefreshDatabase::class);
102102

103103
test('orders can be created', function () {
104104
// Run the DatabaseSeeder...

‎dusk.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ The `DatabaseMigrations` trait will run your database migrations before each tes
163163
use Illuminate\Foundation\Testing\DatabaseMigrations;
164164
use Laravel\Dusk\Browser;
165165

166-
uses(DatabaseMigrations::class);
166+
pest()->use(DatabaseMigrations::class);
167167

168168
//
169169
```
@@ -199,7 +199,7 @@ The `DatabaseTruncation` trait will migrate your database on the first test in o
199199
use Illuminate\Foundation\Testing\DatabaseTruncation;
200200
use Laravel\Dusk\Browser;
201201

202-
uses(DatabaseTruncation::class);
202+
pest()->use(DatabaseTruncation::class);
203203

204204
//
205205
```
@@ -357,7 +357,7 @@ use App\Models\User;
357357
use Illuminate\Foundation\Testing\DatabaseMigrations;
358358
use Laravel\Dusk\Browser;
359359

360-
uses(DatabaseMigrations::class);
360+
pest()->use(DatabaseMigrations::class);
361361

362362
test('basic example', function () {
363363
$user = User::factory()->create([
@@ -2474,7 +2474,7 @@ use Illuminate\Foundation\Testing\DatabaseMigrations;
24742474
use Laravel\Dusk\Browser;
24752475
use Tests\Browser\Components\DatePicker;
24762476

2477-
uses(DatabaseMigrations::class);
2477+
pest()->use(DatabaseMigrations::class);
24782478

24792479
test('basic example', function () {
24802480
$this->browse(function (Browser $browser) {

‎facades.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ use App\Models\Podcast;
257257
use Facades\App\Contracts\Publisher;
258258
use Illuminate\Foundation\Testing\RefreshDatabase;
259259

260-
uses(RefreshDatabase::class);
260+
pest()->use(RefreshDatabase::class);
261261

262262
test('podcast can be published', function () {
263263
$podcast = Podcast::factory()->create();

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /