added $searchIndexModelCleanupList variable

This commit is contained in:
pushrbx 2022-12-04 20:18:12 +00:00
parent 4e7d2fd5ed
commit ce3e7e5e49
2 changed files with 7 additions and 2 deletions

View File

@ -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]);
}
}

View File

@ -8,6 +8,8 @@ class AnimeSearchEndpointTest extends TestCase
{
use DatabaseMigrations, ScoutFlush;
protected array $searchIndexModelCleanupList = ["App\\Anime"];
public function limitParameterCombinationsProvider(): array
{
return [