diff --git a/tests/database/migrations/create_users_table.php b/tests/database/migrations/create_users_table.php new file mode 100644 index 0000000..baf98cd --- /dev/null +++ b/tests/database/migrations/create_users_table.php @@ -0,0 +1,27 @@ +id(); + $table->string('name'); + $table->string('email')->unique(); + $table->timestamp('email_verified_at')->nullable(); + $table->string('password'); + $table->rememberToken(); + $table->timestamps(); + }); + } + + public function down(): void + { + Schema::dropIfExists('users'); + } +}; diff --git a/tests/src/TestCase.php b/tests/src/TestCase.php index e79606d..b8d7999 100644 --- a/tests/src/TestCase.php +++ b/tests/src/TestCase.php @@ -6,14 +6,12 @@ use Illuminate\Foundation\Testing\LazilyRefreshDatabase; use Laravelcm\Subscriptions\SubscriptionServiceProvider; -use Orchestra\Testbench\Concerns\WithWorkbench; use Orchestra\Testbench\TestCase as BaseTestCase; use Tests\Models\User; abstract class TestCase extends BaseTestCase { use LazilyRefreshDatabase; - use WithWorkbench; protected function getPackageProviders($app): array { @@ -24,8 +22,10 @@ protected function getPackageProviders($app): array protected function defineDatabaseMigrations(): void { - $this->loadLaravelMigrations(); - $this->loadMigrationsFrom(__DIR__.'/../../database/migrations'); + $this->loadMigrationsFrom([ + __DIR__.'/../database/migrations', + __DIR__.'/../../database/migrations', + ]); } protected function getEnvironmentSetUp($app): void