mirror of
https://github.com/jikan-me/jikan-rest.git
synced 2025-02-20 11:23:35 +08:00
added $searchIndexModelCleanupList
variable
This commit is contained in:
parent
4e7d2fd5ed
commit
ce3e7e5e49
@ -4,10 +4,13 @@ namespace App\Testing;
|
||||
|
||||
trait ScoutFlush
|
||||
{
|
||||
protected array $searchIndexModelCleanupList = [
|
||||
"App\\Anime", "App\\Manga", "App\\Character", "App\\GenreAnime", "App\\GenreManga", "App\\Person"
|
||||
];
|
||||
|
||||
public function runScoutFlush(): void
|
||||
{
|
||||
$models = ["App\\Anime", "App\\Manga", "App\\Character", "App\\GenreAnime", "App\\GenreManga", "App\\Person"];
|
||||
foreach ($models as $model) {
|
||||
foreach ($this->searchIndexModelCleanupList as $model) {
|
||||
$this->artisan("scout:flush", ["model" => $model]);
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ class AnimeSearchEndpointTest extends TestCase
|
||||
{
|
||||
use DatabaseMigrations, ScoutFlush;
|
||||
|
||||
protected array $searchIndexModelCleanupList = ["App\\Anime"];
|
||||
|
||||
public function limitParameterCombinationsProvider(): array
|
||||
{
|
||||
return [
|
||||
|
Loading…
x
Reference in New Issue
Block a user