Skip to content

Commit 589b321

Browse files
committed
formatting
1 parent 3caf2ef commit 589b321

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

database-testing.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,12 @@ If you would like to use [database seeders](/docs/{{version}}/seeding) to popula
546546
}
547547
}
548548

549-
Alternatively, you may instruct the `RefreshDatabase` trait to automatically seed the database before each test. You may accomplish this by defining a `$seed` property on your test class, or use a specific seeder using the `$seeder` property:
549+
Alternatively, you may instruct the `RefreshDatabase` trait to automatically seed the database before each test. You may accomplish this by defining a `$seed` property on your test class:
550550

551551
<?php
552552

553553
namespace Tests\Feature;
554554

555-
use Database\Seeders\OrderStatusSeeder;
556555
use Illuminate\Foundation\Testing\RefreshDatabase;
557556
use Tests\TestCase;
558557

@@ -565,16 +564,20 @@ Alternatively, you may instruct the `RefreshDatabase` trait to automatically see
565564
*/
566565
protected $seed = true;
567566

568-
/**
569-
* Run a specific seeder before each test.
570-
*
571-
* @var string
572-
*/
573-
protected $seeder = OrderStatusSeeder::class;
574-
575567
// ...
576568
}
577569

570+
When the `$seed` property is `true`, the test will run the `Database\Seeders\DatabaseSeeder` class before each test. However, you may specify a specific seeder that should be executed by defining a `$seeder` property on your test class:
571+
572+
use Database\Seeders\OrderStatusSeeder;
573+
574+
/**
575+
* Run a specific seeder before each test.
576+
*
577+
* @var string
578+
*/
579+
protected $seeder = OrderStatusSeeder::class;
580+
578581
<a name="available-assertions"></a>
579582
## Available Assertions
580583

0 commit comments

Comments
 (0)