Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ protected function defineEnvironment($app)
]);
}

/**
* Define database migrations.
*/
protected function defineDatabaseMigrations(): void
{
$this->loadLaravelMigrations();
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
$this->loadMigrationsFrom(__DIR__ . '/Migrations');
}
Comment on lines +28 to +35
Copy link
Contributor

@ericHao22 ericHao22 Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 comment

當初沒特別加的原因是,不一定每個套件都會有table schema,要是沒有的話它嘗試去load migration有可能會報錯?

不過如果真的要加感覺可以保留$this->loadLaravelMigrations();,然後其他的先註解掉也行

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我覺得可以都加上去但是都註解掉


/**
* @param \Illuminate\Foundation\Application $app
* @return array
Expand Down