diff --git a/.env.example b/.env.example index fd6be2e87..628ac2bd0 100644 --- a/.env.example +++ b/.env.example @@ -225,11 +225,6 @@ SCOUT_IDENTIFY=false ALGOLIA_APP_ID= ALGOLIA_SECRET= -ELASTIC_CONNECTION=default -ELASTIC_HOST=http://elasticsearch:9200 -ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS=false -ELASTIC_MIGRATIONS_TABLE=elastic_migrations - TYPESENSE_HOST=typesense TYPESENSE_PORT=8108 TYPESENSE_PROTOCOL=http diff --git a/app/Concerns/Elastic/ConfiguresTextAnalyzers.php b/app/Concerns/Elastic/ConfiguresTextAnalyzers.php deleted file mode 100644 index 7d316f034..000000000 --- a/app/Concerns/Elastic/ConfiguresTextAnalyzers.php +++ /dev/null @@ -1,26 +0,0 @@ -analysis([ - 'analyzer' => [ - 'name_search' => [ - 'type' => 'custom', - 'tokenizer' => 'standard', - 'filter' => [ - 'lowercase', - 'word_delimiter_graph', - ], - ], - ], - ]); - } -} diff --git a/app/Filament/Providers/GlobalSearchScoutProvider.php b/app/Filament/Providers/GlobalSearchScoutProvider.php index 9366480ad..682a2a69f 100644 --- a/app/Filament/Providers/GlobalSearchScoutProvider.php +++ b/app/Filament/Providers/GlobalSearchScoutProvider.php @@ -7,13 +7,13 @@ namespace App\Filament\Providers; use App\Filament\Resources\BaseResource; use App\Scout\Criteria; use App\Scout\Search; -use Elastic\ScoutDriverPlus\Searchable; use Filament\Facades\Filament; use Filament\GlobalSearch\GlobalSearchResult; use Filament\GlobalSearch\GlobalSearchResults; use Filament\GlobalSearch\Providers\Contracts\GlobalSearchProvider; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; +use Laravel\Scout\Searchable; class GlobalSearchScoutProvider implements GlobalSearchProvider { diff --git a/app/Models/List/ExternalProfile.php b/app/Models/List/ExternalProfile.php index 96ac1d249..d523ffcd0 100644 --- a/app/Models/List/ExternalProfile.php +++ b/app/Models/List/ExternalProfile.php @@ -15,10 +15,7 @@ use App\Models\Auth\User; use App\Models\BaseModel; use App\Models\List\External\ExternalEntry; use App\Models\List\External\ExternalToken; -use App\Scout\Elasticsearch\Models\List\ExternalProfileElasticModel; -use App\Scout\Typesense\Models\List\ExternalProfileTypesenseModel; use Database\Factories\List\ExternalProfileFactory; -use Elastic\ScoutDriverPlus\Searchable; use Illuminate\Database\Eloquent\Attributes\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; @@ -32,6 +29,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Str; use Illuminate\Support\Uri; +use Laravel\Scout\Searchable; use RuntimeException; /** @@ -140,12 +138,23 @@ class ExternalProfile extends BaseModel { return match ($driver = Config::get('scout.driver')) { 'collection', - 'elastic' => ExternalProfileElasticModel::toSearchableArray($this), - 'typesense' => ExternalProfileTypesenseModel::toSearchableArray($this), + 'typesense' => $this->toTypesenseArray(), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; } + /** + * @return array + */ + protected function toTypesenseArray(): array + { + return [ + 'id' => (string) $this->getKey(), + 'name' => $this->name, + 'site' => $this->site->value, + ]; + } + /** * Get the index name for the model when searching. */ diff --git a/app/Models/List/Playlist.php b/app/Models/List/Playlist.php index 4268665e4..42fc51c96 100644 --- a/app/Models/List/Playlist.php +++ b/app/Models/List/Playlist.php @@ -15,10 +15,7 @@ use App\Models\BaseModel; use App\Models\List\Playlist\PlaylistTrack; use App\Models\Wiki\Image; use App\Pivots\Morph\Imageable; -use App\Scout\Elasticsearch\Models\List\PlaylistElasticModel; -use App\Scout\Typesense\Models\List\PlaylistTypesenseModel; use Database\Factories\List\PlaylistFactory; -use Elastic\ScoutDriverPlus\Searchable; use Illuminate\Database\Eloquent\Attributes\Table; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsTo; @@ -26,6 +23,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Config; +use Laravel\Scout\Searchable; use RuntimeException; /** @@ -165,12 +163,23 @@ class Playlist extends BaseModel implements HasHashids, HasImages { return match ($driver = Config::get('scout.driver')) { 'collection', - 'elastic' => PlaylistElasticModel::toSearchableArray($this), - 'typesense' => PlaylistTypesenseModel::toSearchableArray($this), + 'typesense' => $this->toTypesenseArray(), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; } + /** + * @return array + */ + protected function toTypesenseArray(): array + { + return [ + 'id' => (string) $this->getKey(), + 'name' => $this->name, + 'created_at' => $this->created_at?->timestamp, + ]; + } + /** * @return BelongsTo */ diff --git a/app/Models/Wiki/Anime.php b/app/Models/Wiki/Anime.php index 304085a2c..7d316deef 100644 --- a/app/Models/Wiki/Anime.php +++ b/app/Models/Wiki/Anime.php @@ -25,12 +25,9 @@ use App\Pivots\Morph\Imageable; use App\Pivots\Morph\Resourceable; use App\Pivots\Wiki\AnimeSeries; use App\Pivots\Wiki\AnimeStudio; -use App\Scout\Elasticsearch\Models\Wiki\AnimeElasticModel; -use App\Scout\Typesense\Models\Wiki\AnimeTypesenseModel; use App\ValueObjects\FuzzyDate; use Database\Factories\Wiki\AnimeFactory; use Deprecated; -use Elastic\ScoutDriverPlus\Searchable; use Illuminate\Database\Eloquent\Attributes\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; @@ -40,6 +37,7 @@ use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Config; +use Laravel\Scout\Searchable; use OwenIt\Auditing\Auditable as HasAudits; use OwenIt\Auditing\Contracts\Auditable; use RuntimeException; @@ -209,8 +207,22 @@ class Anime extends BaseModel implements Auditable, HasImages, HasResources, Has { return match ($driver = Config::get('scout.driver')) { 'collection', - 'elastic' => AnimeElasticModel::toSearchableArray($this), - 'typesense' => AnimeTypesenseModel::toSearchableArray($this), + 'typesense' => (fn () => [ + 'id' => (string) $this->getKey(), + 'format' => $this->format?->value, + 'title' => $this->title, + // So TypeSense does not boost when alternative titles are the same. + 'title_english' => $this->title_english !== $this->title + ? $this->title_english + : null, + 'title_native' => $this->title_native !== $this->title + ? $this->title_native + : null, + 'season' => $this->season?->value, + 'year' => $this->year, + 'created_at' => $this->created_at->timestamp, + 'synonyms' => $this->synonyms->map(fn (Synonym $synonym) => $synonym->text)->all(), + ])(), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; } diff --git a/app/Models/Wiki/Artist.php b/app/Models/Wiki/Artist.php index 50e8f9f55..e36f27b47 100644 --- a/app/Models/Wiki/Artist.php +++ b/app/Models/Wiki/Artist.php @@ -19,11 +19,8 @@ use App\Models\BaseModel; use App\Pivots\Morph\Imageable; use App\Pivots\Morph\Resourceable; use App\Pivots\Wiki\ArtistMember; -use App\Scout\Elasticsearch\Models\Wiki\ArtistElasticModel; -use App\Scout\Typesense\Models\Wiki\ArtistTypesenseModel; use Database\Factories\Wiki\ArtistFactory; use Deprecated; -use Elastic\ScoutDriverPlus\Searchable; use Illuminate\Database\Eloquent\Attributes\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; @@ -33,6 +30,7 @@ use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Config; +use Laravel\Scout\Searchable; use OwenIt\Auditing\Auditable as HasAudits; use OwenIt\Auditing\Contracts\Auditable; use RuntimeException; @@ -162,12 +160,39 @@ class Artist extends BaseModel implements Auditable, HasImages, HasResources, Ha { return match ($driver = Config::get('scout.driver')) { 'collection', - 'elastic' => ArtistElasticModel::toSearchableArray($this), - 'typesense' => ArtistTypesenseModel::toSearchableArray($this), + 'typesense' => $this->toTypesenseArray(), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; } + /** + * @return array + */ + protected function toTypesenseArray(): array + { + return [ + 'id' => (string) $this->getKey(), + 'name' => $this->name, + // So TypeSense does not boost when alternative names are the same. + 'name_native' => $this->name_native !== $this->name ? $this->name_native : null, + 'created_at' => $this->created_at->timestamp, + 'synonyms' => $synonyms = $this->synonyms->map(fn (Synonym $synonym) => $synonym->text)->all(), + 'as' => $as = $this->performances->map(fn (Performance $performance) => $performance->as) + ->toBase() + ->concat($this->memberPerformances->map(fn (Performance $performance) => $performance->member_as)) + ->filter() + ->unique() + ->values() + ->all(), + 'search_text' => implode(' ', [ + $this->name, + $this->name_native, + ...$synonyms, + // ...$as, + ]), + ]; + } + /** * Get the route key for the model. * diff --git a/app/Models/Wiki/Entry.php b/app/Models/Wiki/Entry.php index c233ac4a6..d0475971d 100644 --- a/app/Models/Wiki/Entry.php +++ b/app/Models/Wiki/Entry.php @@ -20,11 +20,8 @@ use App\Models\BaseModel; use App\Models\List\Playlist\PlaylistTrack; use App\Pivots\Morph\Resourceable; use App\Pivots\Wiki\EntryVideo; -use App\Scout\Elasticsearch\Models\Wiki\EntryElasticModel; -use App\Scout\Typesense\Models\Wiki\EntryTypesenseModel; use Database\Factories\Wiki\EntryFactory; use Deprecated; -use Elastic\ScoutDriverPlus\Searchable; use Illuminate\Database\Eloquent\Attributes\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; @@ -36,6 +33,7 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\Config; use Illuminate\Support\Str; use Illuminate\Support\Stringable; +use Laravel\Scout\Searchable; use OwenIt\Auditing\Auditable as HasAudits; use OwenIt\Auditing\Contracts\Auditable; use RuntimeException; @@ -177,12 +175,25 @@ class Entry extends BaseModel implements Auditable, HasResources, InteractsWithS { return match ($driver = Config::get('scout.driver')) { 'collection', - 'elastic' => EntryElasticModel::toSearchableArray($this), - 'typesense' => EntryTypesenseModel::toSearchableArray($this), + 'typesense' => $this->toTypesenseArray(), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; } + /** + * @return array + */ + protected function toTypesenseArray(): array + { + return [ + 'id' => (string) $this->getKey(), + 'theme' => $this->theme->toSearchableArray(), + 'version' => $version = Str::of(strval($this->version))->prepend('v')->__toString(), + 'type_sequence_version' => $this->theme->type->localize().(($this->theme->sequence ?? 1)).$version, + 'created_at' => $this->created_at->timestamp, + ]; + } + public function getName(): string { $theme = $this->animetheme; diff --git a/app/Models/Wiki/Series.php b/app/Models/Wiki/Series.php index 559124378..bdddbb8b7 100644 --- a/app/Models/Wiki/Series.php +++ b/app/Models/Wiki/Series.php @@ -13,16 +13,14 @@ use App\Events\Wiki\Series\SeriesUpdated; use App\Http\Resources\Pivot\Wiki\Resource\AnimeSeriesJsonResource; use App\Models\BaseModel; use App\Pivots\Wiki\AnimeSeries; -use App\Scout\Elasticsearch\Models\Wiki\SeriesElasticModel; -use App\Scout\Typesense\Models\Wiki\SeriesTypesenseModel; use Database\Factories\Wiki\SeriesFactory; -use Elastic\ScoutDriverPlus\Searchable; use Illuminate\Database\Eloquent\Attributes\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Config; +use Laravel\Scout\Searchable; use OwenIt\Auditing\Auditable as HasAudits; use OwenIt\Auditing\Contracts\Auditable; use RuntimeException; @@ -107,12 +105,26 @@ class Series extends BaseModel implements Auditable, SoftDeletable { return match ($driver = Config::get('scout.driver')) { 'collection', - 'elastic' => SeriesElasticModel::toSearchableArray($this), - 'typesense' => SeriesTypesenseModel::toSearchableArray($this), + 'typesense' => $this->toTypesenseArray(), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; } + /** + * @return array + */ + protected function toTypesenseArray(): array + { + return [ + 'id' => (string) $this->getKey(), + 'title' => $this->title, + 'created_at' => $this->created_at->timestamp, + 'anime' => $this->anime->map( + fn (Anime $anime): array => $anime->toSearchableArray() + )->all(), + ]; + } + /** * Get the route key for the model. * diff --git a/app/Models/Wiki/Song.php b/app/Models/Wiki/Song.php index e5973bdd0..dc1f3bf63 100644 --- a/app/Models/Wiki/Song.php +++ b/app/Models/Wiki/Song.php @@ -14,11 +14,8 @@ use App\Events\Wiki\Song\SongRestored; use App\Events\Wiki\Song\SongUpdated; use App\Models\BaseModel; use App\Pivots\Morph\Resourceable; -use App\Scout\Elasticsearch\Models\Wiki\SongElasticModel; -use App\Scout\Typesense\Models\Wiki\SongTypesenseModel; use Database\Factories\Wiki\SongFactory; use Deprecated; -use Elastic\ScoutDriverPlus\Searchable; use Illuminate\Database\Eloquent\Attributes\Table; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsToMany; @@ -26,6 +23,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Config; +use Laravel\Scout\Searchable; use OwenIt\Auditing\Auditable as HasAudits; use OwenIt\Auditing\Contracts\Auditable; use RuntimeException; @@ -120,12 +118,25 @@ class Song extends BaseModel implements Auditable, HasResources, SoftDeletable { return match ($driver = Config::get('scout.driver')) { 'collection', - 'elastic' => SongElasticModel::toSearchableArray($this), - 'typesense' => SongTypesenseModel::toSearchableArray($this), + 'typesense' => $this->toTypesenseArray(), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; } + /** + * @return array + */ + protected function toTypesenseArray(): array + { + return [ + 'id' => (string) $this->getKey(), + 'title' => $this->title, + // So TypeSense does not boost when alternative titles are the same. + 'title_native' => $this->title_native !== $this->title ? $this->title_native : null, + 'created_at' => $this->created_at->timestamp, + ]; + } + public function getName(): string { if (blank($this->title)) { diff --git a/app/Models/Wiki/Studio.php b/app/Models/Wiki/Studio.php index e9667afdf..d6cb9d8e3 100644 --- a/app/Models/Wiki/Studio.php +++ b/app/Models/Wiki/Studio.php @@ -17,16 +17,14 @@ use App\Models\BaseModel; use App\Pivots\Morph\Imageable; use App\Pivots\Morph\Resourceable; use App\Pivots\Wiki\AnimeStudio; -use App\Scout\Elasticsearch\Models\Wiki\StudioElasticModel; -use App\Scout\Typesense\Models\Wiki\StudioTypesenseModel; use Database\Factories\Wiki\StudioFactory; -use Elastic\ScoutDriverPlus\Searchable; use Illuminate\Database\Eloquent\Attributes\Table; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Config; +use Laravel\Scout\Searchable; use OwenIt\Auditing\Auditable as HasAudits; use OwenIt\Auditing\Contracts\Auditable; use RuntimeException; @@ -106,12 +104,23 @@ class Studio extends BaseModel implements Auditable, HasImages, HasResources, So { return match ($driver = Config::get('scout.driver')) { 'collection', - 'elastic' => StudioElasticModel::toSearchableArray($this), - 'typesense' => StudioTypesenseModel::toSearchableArray($this), + 'typesense' => $this->toTypesenseArray(), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; } + /** + * @return array + */ + protected function toTypesenseArray(): array + { + return [ + 'id' => (string) $this->getKey(), + 'name' => $this->name, + 'created_at' => $this->created_at->timestamp, + ]; + } + /** * Get the route key for the model. * diff --git a/app/Models/Wiki/Theme.php b/app/Models/Wiki/Theme.php index 9e6e4ac61..6232f268e 100644 --- a/app/Models/Wiki/Theme.php +++ b/app/Models/Wiki/Theme.php @@ -17,11 +17,8 @@ use App\Http\Api\Schema\Wiki\ThemeSchema; use App\Models\BaseModel; use App\Observers\Wiki\ThemeObserver; use App\Scopes\WithoutInsertSongScope; -use App\Scout\Elasticsearch\Models\Wiki\ThemeElasticModel; -use App\Scout\Typesense\Models\Wiki\ThemeTypesenseModel; use Database\Factories\Wiki\ThemeFactory; use Deprecated; -use Elastic\ScoutDriverPlus\Searchable; use Illuminate\Database\Eloquent\Attributes\ObservedBy; use Illuminate\Database\Eloquent\Attributes\ScopedBy; use Illuminate\Database\Eloquent\Attributes\Table; @@ -33,6 +30,7 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\Config; use Illuminate\Support\Str; use Illuminate\Support\Stringable; +use Laravel\Scout\Searchable; use OwenIt\Auditing\Auditable as HasAudits; use OwenIt\Auditing\Contracts\Auditable; use RuntimeException; @@ -165,12 +163,30 @@ class Theme extends BaseModel implements Auditable, InteractsWithSchema, SoftDel { return match ($driver = Config::get('scout.driver')) { 'collection', - 'elastic' => ThemeElasticModel::toSearchableArray($this), - 'typesense' => ThemeTypesenseModel::toSearchableArray($this), + 'typesense' => $this->toTypesenseArray(), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; } + /** + * @return array + */ + protected function toTypesenseArray(): array + { + return [ + 'id' => (string) $this->getKey(), + 'created_at' => $this->created_at->timestamp, + + 'type_sequence' => $this->type->localize().($this->sequence ?? 1), + 'type' => $this->type->value, + 'sequence' => $this->sequence ?? 1, + + 'anime' => $this->anime->toSearchableArray(), + 'song' => $this->song?->toSearchableArray(), + 'song_title' => $this->song?->title, + ]; + } + public function getName(): string { return Str::of($this->anime->getName()) diff --git a/app/Models/Wiki/Video.php b/app/Models/Wiki/Video.php index 7938cac90..a179ef7ab 100644 --- a/app/Models/Wiki/Video.php +++ b/app/Models/Wiki/Video.php @@ -21,11 +21,8 @@ use App\Models\List\Playlist; use App\Models\List\Playlist\PlaylistTrack; use App\Models\Wiki\Video\VideoScript; use App\Pivots\Wiki\EntryVideo; -use App\Scout\Elasticsearch\Models\Wiki\VideoElasticModel; -use App\Scout\Typesense\Models\Wiki\VideoTypesenseModel; use Database\Factories\Wiki\VideoFactory; use Deprecated; -use Elastic\ScoutDriverPlus\Searchable; use Illuminate\Database\Eloquent\Attributes\Appends; use Illuminate\Database\Eloquent\Attributes\Table; use Illuminate\Database\Eloquent\Builder; @@ -37,6 +34,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Config; +use Laravel\Scout\Searchable; use OwenIt\Auditing\Auditable as HasAudits; use OwenIt\Auditing\Contracts\Auditable; use RuntimeException; @@ -279,12 +277,27 @@ class Video extends BaseModel implements Auditable, SoftDeletable, Streamable { return match ($driver = Config::get('scout.driver')) { 'collection', - 'elastic' => VideoElasticModel::toSearchableArray($this), - 'typesense' => VideoTypesenseModel::toSearchableArray($this), + 'typesense' => $this->toTypesenseArray(), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; } + /** + * @return array + */ + protected function toTypesenseArray(): array + { + return [ + 'id' => (string) $this->getKey(), + 'filename' => $this->filename, + 'tags' => $this->tags, + 'created_at' => $this->created_at->timestamp, + 'entries' => $this->animethemeentries->map( + fn (Entry $entry): array => $entry->toSearchableArray() + )->all(), + ]; + } + /** * Get the route key for the model. * diff --git a/app/Scout/Elasticsearch/Api/Criteria/Filter/Criteria.php b/app/Scout/Elasticsearch/Api/Criteria/Filter/Criteria.php deleted file mode 100644 index d6c8634b9..000000000 --- a/app/Scout/Elasticsearch/Api/Criteria/Filter/Criteria.php +++ /dev/null @@ -1,17 +0,0 @@ -getElasticsearchClause($filter); - - if ($this->criteria->getLogicalOperator() === BinaryLogicalOperator::OR) { - if ($this->criteria->getComparisonOperator() === ComparisonOperator::NE) { - return $builder->should(new BoolQueryBuilder()->mustNot($clause)); - } - - return $builder->should($clause); - } - - if ($this->criteria->getComparisonOperator() === ComparisonOperator::NE) { - return $builder->mustNot($clause); - } - - return $builder->must($clause); - } - - /** - * Build clause for Elasticsearch filter based on comparison operator. - */ - protected function getElasticsearchClause(Filter $filter): QueryBuilderInterface - { - $filterValue = $this->coerceFilterValue($filter); - - return match ($this->criteria->getComparisonOperator()) { - ComparisonOperator::LT => ElasticQuery::range()->field($filter->getColumn())->lt($filterValue), - ComparisonOperator::GT => ElasticQuery::range()->field($filter->getColumn())->gt($filterValue), - ComparisonOperator::LTE => ElasticQuery::range()->field($filter->getColumn())->lte($filterValue), - ComparisonOperator::GTE => ElasticQuery::range()->field($filter->getColumn())->gte($filterValue), - ComparisonOperator::LIKE => ElasticQuery::wildcard() - ->field($filter->getColumn()) - ->value(Str::replace(['%', '_'], ['*', '?'], $filterValue)) - ->caseInsensitive(true), - ComparisonOperator::NOTLIKE => ElasticQuery::bool()->mustNot( - ElasticQuery::wildcard() - ->field($filter->getColumn()) - ->value(Str::replace(['%', '_'], ['*', '?'], $filterValue)) - ->caseInsensitive(true) - ), - default => ElasticQuery::term()->field($filter->getColumn())->value($filterValue), - }; - } - - /** - * Coerce filter value for elasticsearch range and term queries. - */ - protected function coerceFilterValue(Filter $filter): string - { - $filterValue = Arr::first($filter->getFilterValues($this->criteria->getFilterValues())); - - // Elasticsearch wants 'true' or 'false' for boolean fields - if (is_bool($filterValue)) { - return $filterValue ? 'true' : 'false'; - } - - // The Elasticsearch driver wants a string for wildcard & term queries - return strval($filterValue); - } -} diff --git a/app/Scout/Elasticsearch/Api/Criteria/Filter/WhereInCriteria.php b/app/Scout/Elasticsearch/Api/Criteria/Filter/WhereInCriteria.php deleted file mode 100644 index 22b497f73..000000000 --- a/app/Scout/Elasticsearch/Api/Criteria/Filter/WhereInCriteria.php +++ /dev/null @@ -1,44 +0,0 @@ -not = $criteria->not(); - } - - public function filter(BoolQueryBuilder $builder, Filter $filter, Query $query): BoolQueryBuilder - { - $filterValues = $filter->getFilterValues($this->criteria->getFilterValues()); - - $clause = ElasticQuery::terms()->field($filter->getColumn())->values($filterValues); - - if ($this->criteria->getLogicalOperator() === BinaryLogicalOperator::OR) { - if ($this->not) { - return $builder->should(new BoolQueryBuilder()->mustNot($clause)); - } - - return $builder->should($clause); - } - - if ($this->not) { - return $builder->mustNot($clause); - } - - return $builder->must($clause); - } -} diff --git a/app/Scout/Elasticsearch/Api/Criteria/Paging/Criteria.php b/app/Scout/Elasticsearch/Api/Criteria/Paging/Criteria.php deleted file mode 100644 index b342f2848..000000000 --- a/app/Scout/Elasticsearch/Api/Criteria/Paging/Criteria.php +++ /dev/null @@ -1,23 +0,0 @@ -criteria->getStrategy(); - } - - abstract public function paginate(SearchParametersBuilder $builder): Collection|Paginator; -} diff --git a/app/Scout/Elasticsearch/Api/Criteria/Paging/LimitCriteria.php b/app/Scout/Elasticsearch/Api/Criteria/Paging/LimitCriteria.php deleted file mode 100644 index 2170fbd2a..000000000 --- a/app/Scout/Elasticsearch/Api/Criteria/Paging/LimitCriteria.php +++ /dev/null @@ -1,26 +0,0 @@ -size($this->criteria->getResultSize()) - ->execute() - ->models(); - } -} diff --git a/app/Scout/Elasticsearch/Api/Criteria/Paging/OffsetCriteria.php b/app/Scout/Elasticsearch/Api/Criteria/Paging/OffsetCriteria.php deleted file mode 100644 index 63bf46350..000000000 --- a/app/Scout/Elasticsearch/Api/Criteria/Paging/OffsetCriteria.php +++ /dev/null @@ -1,43 +0,0 @@ -append('.') - ->append(BaseCriteria::NUMBER_PARAM) - ->__toString(); - - $pageNameLink = Str::of(PagingParser::param()) - ->append('[') - ->append(BaseCriteria::NUMBER_PARAM) - ->append(']') - ->__toString(); - - $paginator = $builder->paginate($this->criteria->getResultSize(), $pageNameQuery) - ->setPageName($pageNameLink) - ->appends(Request::except($pageNameQuery)); - - $paginator->setCollection($paginator->models()); - - return $paginator; - } -} diff --git a/app/Scout/Elasticsearch/Api/Criteria/Sort/Criteria.php b/app/Scout/Elasticsearch/Api/Criteria/Sort/Criteria.php deleted file mode 100644 index 465581c73..000000000 --- a/app/Scout/Elasticsearch/Api/Criteria/Sort/Criteria.php +++ /dev/null @@ -1,15 +0,0 @@ -direction = $criteria->getDirection(); - } - - public function sort(Sort $sort): array - { - return [$sort->getColumn() => $this->direction->value]; - } -} diff --git a/app/Scout/Elasticsearch/Api/Criteria/Sort/RelationCriteria.php b/app/Scout/Elasticsearch/Api/Criteria/Sort/RelationCriteria.php deleted file mode 100644 index e7fe3fa53..000000000 --- a/app/Scout/Elasticsearch/Api/Criteria/Sort/RelationCriteria.php +++ /dev/null @@ -1,26 +0,0 @@ -getColumn() => [ - 'order' => $this->direction->value, - 'nested' => [ - 'path' => Str::beforeLast($sort->getColumn(), '.'), - ], - ], - ]; - } -} diff --git a/app/Scout/Elasticsearch/Api/Field/Base/CreatedAtField.php b/app/Scout/Elasticsearch/Api/Field/Base/CreatedAtField.php deleted file mode 100644 index d6a88324f..000000000 --- a/app/Scout/Elasticsearch/Api/Field/Base/CreatedAtField.php +++ /dev/null @@ -1,17 +0,0 @@ -getKey(), $this->getSearchField()); - } - - public function getSort(): Sort - { - return new Sort($this->getKey(), $this->getSortField()); - } -} diff --git a/app/Scout/Elasticsearch/Api/Field/DateField.php b/app/Scout/Elasticsearch/Api/Field/DateField.php deleted file mode 100644 index 3de067e29..000000000 --- a/app/Scout/Elasticsearch/Api/Field/DateField.php +++ /dev/null @@ -1,24 +0,0 @@ -getKey(), $this->getSearchField()); - } - - public function getSort(): Sort - { - return new Sort($this->getKey(), $this->getSortField()); - } -} diff --git a/app/Scout/Elasticsearch/Api/Field/EnumField.php b/app/Scout/Elasticsearch/Api/Field/EnumField.php deleted file mode 100644 index c1b1a3dc9..000000000 --- a/app/Scout/Elasticsearch/Api/Field/EnumField.php +++ /dev/null @@ -1,37 +0,0 @@ -getKey(), $this->enumClass, $this->getSearchField()); - } - - public function getSort(): Sort - { - return new Sort($this->getKey(), $this->getSortField()); - } -} diff --git a/app/Scout/Elasticsearch/Api/Field/Field.php b/app/Scout/Elasticsearch/Api/Field/Field.php deleted file mode 100644 index a1932756e..000000000 --- a/app/Scout/Elasticsearch/Api/Field/Field.php +++ /dev/null @@ -1,38 +0,0 @@ -schema; - } - - public function getKey(): string - { - return $this->key; - } - - public function getSearchField(): ?string - { - return $this->searchField ?? $this->key; - } - - public function getSortField(): ?string - { - return $this->sortField ?? $this->getSearchField(); - } -} diff --git a/app/Scout/Elasticsearch/Api/Field/FloatField.php b/app/Scout/Elasticsearch/Api/Field/FloatField.php deleted file mode 100644 index 4dcce210a..000000000 --- a/app/Scout/Elasticsearch/Api/Field/FloatField.php +++ /dev/null @@ -1,24 +0,0 @@ -getKey(), $this->getSearchField()); - } - - public function getSort(): Sort - { - return new Sort($this->getKey(), $this->getSortField()); - } -} diff --git a/app/Scout/Elasticsearch/Api/Field/IntField.php b/app/Scout/Elasticsearch/Api/Field/IntField.php deleted file mode 100644 index 5edb3919a..000000000 --- a/app/Scout/Elasticsearch/Api/Field/IntField.php +++ /dev/null @@ -1,24 +0,0 @@ -getKey(), $this->getSearchField()); - } - - public function getSort(): Sort - { - return new Sort($this->getKey(), $this->getSortField()); - } -} diff --git a/app/Scout/Elasticsearch/Api/Field/List/Playlist/PlaylistDescriptionField.php b/app/Scout/Elasticsearch/Api/Field/List/Playlist/PlaylistDescriptionField.php deleted file mode 100644 index e4ebbf05a..000000000 --- a/app/Scout/Elasticsearch/Api/Field/List/Playlist/PlaylistDescriptionField.php +++ /dev/null @@ -1,17 +0,0 @@ -getKey(), $this->getSearchField()); - } - - public function getSort(): Sort - { - return new Sort($this->getKey(), $this->getSortField()); - } -} diff --git a/app/Scout/Elasticsearch/Api/Field/Wiki/Anime/AnimeMediaFormatField.php b/app/Scout/Elasticsearch/Api/Field/Wiki/Anime/AnimeMediaFormatField.php deleted file mode 100644 index ec9163e5d..000000000 --- a/app/Scout/Elasticsearch/Api/Field/Wiki/Anime/AnimeMediaFormatField.php +++ /dev/null @@ -1,18 +0,0 @@ - [ - $field => [ - 'query' => $searchTerm, - ], - ], - ], - [ - 'match' => [ - $field => [ - 'query' => $searchTerm, - 'operator' => 'AND', - ], - ], - ], - [ - 'match' => [ - $field => [ - 'query' => $searchTerm, - 'boost' => 0.6, - ], - ], - ], - [ - 'fuzzy' => [ - $field => [ - 'value' => $searchTerm, - 'boost' => 0.4, - ], - ], - ], - ]; - } - - /** - * Helper function for raw queries. This will wrap queries in nested queries. - */ - protected function createNestedQuery(string $nestedResource, array $nestedQueries): array - { - return array_map( - fn (array $nestedQuery): array => [ - 'nested' => [ - 'path' => $nestedResource, - 'query' => $nestedQuery, - ], - ], - $nestedQueries - ); - } - - /** - * Shorthand function for calling `$this->createNestedQuery()` with the output from - * `$this->createTextQuery()`. - */ - protected function createNestedTextQuery(string $nestedResource, string $field, string $searchTerm): array - { - return $this->createNestedQuery($nestedResource, $this->createTextQuery("$nestedResource.$field", $searchTerm)); - } -} diff --git a/app/Scout/Elasticsearch/Api/Query/List/PlaylistQuery.php b/app/Scout/Elasticsearch/Api/Query/List/PlaylistQuery.php deleted file mode 100644 index 358406c43..000000000 --- a/app/Scout/Elasticsearch/Api/Query/List/PlaylistQuery.php +++ /dev/null @@ -1,34 +0,0 @@ -mustRaw([ - // Pick the score of the best performing sub-query. - 'dis_max' => [ - 'queries' => [ - [ - // The more sub-queries match the better the score will be. - 'bool' => [ - 'should' => $this->createTextQuery('name', $criteria->getTerm()), - ], - ], - ], - ], - ]); - - return Playlist::searchQuery($query); - } -} diff --git a/app/Scout/Elasticsearch/Api/Query/Wiki/Anime/Theme/EntryQuery.php b/app/Scout/Elasticsearch/Api/Query/Wiki/Anime/Theme/EntryQuery.php deleted file mode 100644 index 818567620..000000000 --- a/app/Scout/Elasticsearch/Api/Query/Wiki/Anime/Theme/EntryQuery.php +++ /dev/null @@ -1,80 +0,0 @@ -mustRaw([ - // The more sub-queries match the better the score will be. - 'bool' => [ - 'should' => [ - [ - // Pick the score of the best performing sub-query. - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createNestedTextQuery('theme.song', 'title', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.85, - 'should' => $this->createNestedTextQuery('theme.song', 'title_native', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.5, - 'should' => $this->createNestedTextQuery('theme.anime', 'title', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.5 * 0.85, - 'should' => $this->createNestedTextQuery('theme.anime', 'synonyms', $criteria->getTerm()), - ], - ], - ], - ], - ], - [ - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createTextQuery('version_slug', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'should' => $this->createTextQuery('anime_slug', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.85, - 'should' => $this->createTextQuery('synonym_slug', $criteria->getTerm()), - ], - ], - ], - ], - ], - ], - ], - ]); - - return Entry::searchQuery($query); - } -} diff --git a/app/Scout/Elasticsearch/Api/Query/Wiki/Anime/ThemeQuery.php b/app/Scout/Elasticsearch/Api/Query/Wiki/Anime/ThemeQuery.php deleted file mode 100644 index af130e8a8..000000000 --- a/app/Scout/Elasticsearch/Api/Query/Wiki/Anime/ThemeQuery.php +++ /dev/null @@ -1,86 +0,0 @@ -mustRaw([ - // The more sub-queries match the better the score will be. - 'bool' => [ - 'should' => [ - [ - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createNestedTextQuery('song', 'title', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.9, - 'should' => $this->createNestedTextQuery('song', 'title_native', $criteria->getTerm()), - ], - ], - ], - ], - ], - [ - // Pick the score of the best performing sub-query. - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'boost' => 0.8, - 'should' => $this->createNestedTextQuery('anime', 'title', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.8 * 0.85, - 'should' => $this->createNestedTextQuery('anime', 'synonyms', $criteria->getTerm()), - ], - ], - ], - ], - ], - [ - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createTextQuery('slug', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'should' => $this->createTextQuery('anime_slug', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.7, - 'should' => $this->createTextQuery('synonym_slug', $criteria->getTerm()), - ], - ], - ], - ], - ], - ], - ], - ]); - - return Theme::searchQuery($query); - } -} diff --git a/app/Scout/Elasticsearch/Api/Query/Wiki/AnimeQuery.php b/app/Scout/Elasticsearch/Api/Query/Wiki/AnimeQuery.php deleted file mode 100644 index c318b589c..000000000 --- a/app/Scout/Elasticsearch/Api/Query/Wiki/AnimeQuery.php +++ /dev/null @@ -1,40 +0,0 @@ -mustRaw([ - // Pick the score of the best performing sub-query. - 'dis_max' => [ - 'queries' => [ - [ - // The more sub-queries match the better the score will be. - 'bool' => [ - 'should' => $this->createTextQuery('title', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.85, - 'should' => $this->createTextQuery('synonyms', $criteria->getTerm()), - ], - ], - ], - ], - ]); - - return Anime::searchQuery($query); - } -} diff --git a/app/Scout/Elasticsearch/Api/Query/Wiki/ArtistQuery.php b/app/Scout/Elasticsearch/Api/Query/Wiki/ArtistQuery.php deleted file mode 100644 index f85352f1d..000000000 --- a/app/Scout/Elasticsearch/Api/Query/Wiki/ArtistQuery.php +++ /dev/null @@ -1,44 +0,0 @@ -mustRaw([ - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createTextQuery('name', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.8, - 'should' => $this->createTextQuery('synonyms', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.8 * 0.85, - 'should' => $this->createTextQuery('as', $criteria->getTerm()), - ], - ], - ], - ], - ]); - - return Artist::searchQuery($query); - } -} diff --git a/app/Scout/Elasticsearch/Api/Query/Wiki/SeriesQuery.php b/app/Scout/Elasticsearch/Api/Query/Wiki/SeriesQuery.php deleted file mode 100644 index 170941868..000000000 --- a/app/Scout/Elasticsearch/Api/Query/Wiki/SeriesQuery.php +++ /dev/null @@ -1,38 +0,0 @@ -mustRaw([ - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createTextQuery('title', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.6, - 'should' => $this->createNestedTextQuery('anime', 'synonyms', $criteria->getTerm()), - ], - ], - ], - ], - ]); - - return Series::searchQuery($query); - } -} diff --git a/app/Scout/Elasticsearch/Api/Query/Wiki/SongQuery.php b/app/Scout/Elasticsearch/Api/Query/Wiki/SongQuery.php deleted file mode 100644 index 3cc3aae70..000000000 --- a/app/Scout/Elasticsearch/Api/Query/Wiki/SongQuery.php +++ /dev/null @@ -1,38 +0,0 @@ -mustRaw([ - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createTextQuery('title', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.85, - 'should' => $this->createTextQuery('title_native', $criteria->getTerm()), - ], - ], - ], - ], - ]); - - return Song::searchQuery($query); - } -} diff --git a/app/Scout/Elasticsearch/Api/Query/Wiki/StudioQuery.php b/app/Scout/Elasticsearch/Api/Query/Wiki/StudioQuery.php deleted file mode 100644 index 3457b9d29..000000000 --- a/app/Scout/Elasticsearch/Api/Query/Wiki/StudioQuery.php +++ /dev/null @@ -1,32 +0,0 @@ -mustRaw([ - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createTextQuery('name', $criteria->getTerm()), - ], - ], - ], - ], - ]); - - return Studio::searchQuery($query); - } -} diff --git a/app/Scout/Elasticsearch/Api/Query/Wiki/VideoQuery.php b/app/Scout/Elasticsearch/Api/Query/Wiki/VideoQuery.php deleted file mode 100644 index aeaab27fc..000000000 --- a/app/Scout/Elasticsearch/Api/Query/Wiki/VideoQuery.php +++ /dev/null @@ -1,106 +0,0 @@ -mustRaw([ - 'bool' => [ - 'should' => [ - [ - 'dis_max' => [ - 'queries' => [ - 'bool' => [ - 'should' => $this->createTextQuery('filename', $criteria->getTerm()), - ], - ], - ], - ], - [ - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createTextQuery('tags', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.85, - 'should' => $this->createTextQuery('tags_slug', $criteria->getTerm()), - ], - ], - ], - ], - ], - [ - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createNestedTextQuery('entries.theme.song', 'title', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.85, - 'should' => $this->createNestedTextQuery('entries.theme.song', 'title_native', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.8, - 'should' => $this->createNestedTextQuery('entries.theme.anime', 'title', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.8 * 0.85, - 'should' => $this->createNestedTextQuery('entries.theme.anime', 'synonyms', $criteria->getTerm()), - ], - ], - ], - ], - ], - [ - 'dis_max' => [ - 'queries' => [ - [ - 'bool' => [ - 'should' => $this->createTextQuery('version_slug', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.85, - 'should' => $this->createTextQuery('anime_slug', $criteria->getTerm()), - ], - ], - [ - 'bool' => [ - 'boost' => 0.85, - 'should' => $this->createTextQuery('synonym_slug', $criteria->getTerm()), - ], - ], - ], - ], - ], - - ], - ], - ]); - - return Video::searchQuery($query); - } -} diff --git a/app/Scout/Elasticsearch/Api/Schema/List/PlaylistSchema.php b/app/Scout/Elasticsearch/Api/Schema/List/PlaylistSchema.php deleted file mode 100644 index 13c72f2ef..000000000 --- a/app/Scout/Elasticsearch/Api/Schema/List/PlaylistSchema.php +++ /dev/null @@ -1,57 +0,0 @@ -withIntermediatePaths([ - new AllowedInclude(new ImageSchema(), Playlist::RELATION_IMAGES), - new AllowedInclude(new TrackSchema(), Playlist::RELATION_FIRST), - new AllowedInclude(new TrackSchema(), Playlist::RELATION_LAST), - new AllowedInclude(new TrackSchema(), Playlist::RELATION_TRACKS), - new AllowedInclude(new UserSchema(), Playlist::RELATION_USER), - ]); - } - - /** - * @return Field[] - */ - public function fields(): array - { - return [ - new CreatedAtField($this), - new UpdatedAtField($this), - new PlaylistHashidsField($this), - new PlaylistNameField($this), - new PlaylistDescriptionField($this), - new PlaylistVisibilityField($this), - ]; - } -} diff --git a/app/Scout/Elasticsearch/Api/Schema/Schema.php b/app/Scout/Elasticsearch/Api/Schema/Schema.php deleted file mode 100644 index 80ab5d60b..000000000 --- a/app/Scout/Elasticsearch/Api/Schema/Schema.php +++ /dev/null @@ -1,133 +0,0 @@ -fields()) - ->filter(fn (Field $field): bool => $field instanceof FilterableField) - ->map(fn (FilterableField $field): Filter => $field->getFilter()) - ->all(); - } - - /** - * @return Sort[] - */ - public function sorts(): array - { - return collect($this->fields()) - ->filter(fn (Field $field): bool => $field instanceof SortableField) - ->map(fn (SortableField $field): Sort => $field->getSort()) - ->all(); - } - - /** - * Merge the allowed includes with intermediate paths. - * - * @param AllowedInclude[] $allowedIncludesToMerge - * @return AllowedInclude[] - */ - public function withIntermediatePaths(array $allowedIncludesToMerge = []): array - { - $allowedIncludes = collect(); - - foreach ($allowedIncludesToMerge as $allowedInclude) { - // When a path doesn't have intermediate paths - if ($allowedInclude->isDirectRelation()) { - $allowedIncludes->put($allowedInclude->path(), $allowedInclude); - continue; - } - - $appendPath = Str::of(''); - foreach (explode('.', $allowedInclude->path()) as $path) { - $appendPath = $appendPath->append(blank($appendPath->__toString()) ? '' : '.', $path); - - $stringAppendPath = $appendPath->__toString(); - - $schema = null; - foreach ($allowedIncludesToMerge as $include) { - if ($include->path() === $stringAppendPath) { - $schema = $include->schema(); - break; - } - } - - $schema ??= $this->resolve($stringAppendPath); - - $allowedIncludes->put($stringAppendPath, new AllowedInclude($schema, $stringAppendPath)); - } - } - - return $allowedIncludes->values()->toArray(); - } - - /** - * @throws RuntimeException - */ - protected function resolve(string $path): Schema - { - $model = $this->model(); - - foreach (explode('.', $path) as $path) { - if (! method_exists($model, $path)) { - $classBasename = $model::class; - throw new RuntimeException("Relation '$path' does not exist on model '$classBasename'."); - } - $model = $model->$path()->getRelated(); - } - - if (method_exists($model, 'schema')) { - return $model->schema(); - } - - $schema = Str::of($model::class) - ->replace('Models', 'Scout\\Elasticsearch\\Api\\Schema') - ->append('Schema') - ->__toString(); - - return new $schema; - } - - public function model(): Model - { - $modelClass = Str::of(static::class) - ->replace('Scout\\Elasticsearch\\Api\\Schema', 'Models') - ->remove('Schema') - ->__toString(); - - return new $modelClass; - } -} diff --git a/app/Scout/Elasticsearch/Api/Schema/Wiki/AnimeSchema.php b/app/Scout/Elasticsearch/Api/Schema/Wiki/AnimeSchema.php deleted file mode 100644 index 5fb04e9c5..000000000 --- a/app/Scout/Elasticsearch/Api/Schema/Wiki/AnimeSchema.php +++ /dev/null @@ -1,73 +0,0 @@ -withIntermediatePaths([ - new AllowedInclude(new ArtistSchema(), Anime::RELATION_ARTISTS), - new AllowedInclude(new AudioSchema(), Anime::RELATION_AUDIO), - new AllowedInclude(new EntrySchema(), Anime::RELATION_ENTRIES), - new AllowedInclude(new ExternalResourceSchema(), Anime::RELATION_RESOURCES), - new AllowedInclude(new GroupSchema(), Anime::RELATION_GROUPS), - new AllowedInclude(new ImageSchema(), Anime::RELATION_IMAGES), - new AllowedInclude(new ScriptSchema(), Anime::RELATION_SCRIPTS), - new AllowedInclude(new SeriesSchema(), Anime::RELATION_SERIES), - new AllowedInclude(new SongSchema(), Anime::RELATION_SONG), - new AllowedInclude(new StudioSchema(), Anime::RELATION_STUDIOS), - new AllowedInclude(new SynonymSchema(), Anime::RELATION_ANIMESYNONYMS), - new AllowedInclude(new ThemeSchema(), Anime::RELATION_THEMES), - new AllowedInclude(new VideoSchema(), Anime::RELATION_VIDEOS), - ]); - } - - /** - * @return Field[] - */ - public function fields(): array - { - return array_merge( - parent::fields(), - [ - new IdField($this, Anime::ATTRIBUTE_ID), - new AnimeNameField($this), - new AnimeMediaFormatField($this), - new AnimeSeasonField($this), - new AnimeSlugField($this), - new AnimeSynopsisField($this), - new AnimeYearField($this), - ], - ); - } -} diff --git a/app/Scout/Elasticsearch/Api/Schema/Wiki/ArtistSchema.php b/app/Scout/Elasticsearch/Api/Schema/Wiki/ArtistSchema.php deleted file mode 100644 index d2b7e50b8..000000000 --- a/app/Scout/Elasticsearch/Api/Schema/Wiki/ArtistSchema.php +++ /dev/null @@ -1,59 +0,0 @@ -withIntermediatePaths([ - new AllowedInclude(new AnimeSchema(), Artist::RELATION_ANIME), - new AllowedInclude(new ArtistSchema(), Artist::RELATION_GROUPS), - new AllowedInclude(new ArtistSchema(), Artist::RELATION_MEMBERS), - new AllowedInclude(new ExternalResourceSchema(), Artist::RELATION_RESOURCES), - new AllowedInclude(new GroupSchema(), Artist::RELATION_THEME_GROUPS), - new AllowedInclude(new ImageSchema(), Artist::RELATION_IMAGES), - new AllowedInclude(new SongSchema(), Artist::RELATION_SONGS), - new AllowedInclude(new ThemeSchema(), Artist::RELATION_ANIMETHEMES), - ]); - } - - /** - * @return Field[] - */ - public function fields(): array - { - return array_merge( - parent::fields(), - [ - new IdField($this, Artist::ATTRIBUTE_ID), - new ArtistNameField($this), - new ArtistSlugField($this), - new ArtistInformationField($this), - ], - ); - } -} diff --git a/app/Scout/Elasticsearch/Api/Schema/Wiki/EntrySchema.php b/app/Scout/Elasticsearch/Api/Schema/Wiki/EntrySchema.php deleted file mode 100644 index c04d3ff0d..000000000 --- a/app/Scout/Elasticsearch/Api/Schema/Wiki/EntrySchema.php +++ /dev/null @@ -1,60 +0,0 @@ -withIntermediatePaths([ - new AllowedInclude(new AnimeSchema(), Entry::RELATION_ANIME), - new AllowedInclude(new ThemeSchema(), Entry::RELATION_THEME), - new AllowedInclude(new VideoSchema(), Entry::RELATION_VIDEOS), - ]); - } - - /** - * @return Field[] - */ - public function fields(): array - { - return array_merge( - parent::fields(), - [ - new IdField($this, Entry::ATTRIBUTE_ID), - new EntryEpisodesField($this), - new EntryNotesField($this), - new EntryNsfwField($this), - new EntrySpoilerField($this), - new EntryVersionField($this), - ], - ); - } - - public function model(): Entry - { - return new Entry(); - } -} diff --git a/app/Scout/Elasticsearch/Api/Schema/Wiki/SeriesSchema.php b/app/Scout/Elasticsearch/Api/Schema/Wiki/SeriesSchema.php deleted file mode 100644 index cd2132c63..000000000 --- a/app/Scout/Elasticsearch/Api/Schema/Wiki/SeriesSchema.php +++ /dev/null @@ -1,47 +0,0 @@ -withIntermediatePaths([ - new AllowedInclude(new AnimeSchema(), Series::RELATION_ANIME), - ]); - } - - /** - * @return Field[] - */ - public function fields(): array - { - return array_merge( - parent::fields(), - [ - new IdField($this, Series::ATTRIBUTE_ID), - new SeriesNameField($this), - new SeriesSlugField($this), - ], - ); - } -} diff --git a/app/Scout/Elasticsearch/Api/Schema/Wiki/SongSchema.php b/app/Scout/Elasticsearch/Api/Schema/Wiki/SongSchema.php deleted file mode 100644 index 2dd0fe7c6..000000000 --- a/app/Scout/Elasticsearch/Api/Schema/Wiki/SongSchema.php +++ /dev/null @@ -1,51 +0,0 @@ -withIntermediatePaths([ - new AllowedInclude(new AnimeSchema(), Song::RELATION_ANIME), - new AllowedInclude(new ArtistSchema(), Song::RELATION_ARTISTS), - new AllowedInclude(new GroupSchema(), Song::RELATION_THEME_GROUPS), - new AllowedInclude(new ThemeSchema(), Song::RELATION_ANIMETHEMES), - ]); - } - - /** - * @return Field[] - */ - public function fields(): array - { - return array_merge( - parent::fields(), - [ - new IdField($this, Song::ATTRIBUTE_ID), - new SongTitleField($this), - new SongTitleNativeField($this), - ], - ); - } -} diff --git a/app/Scout/Elasticsearch/Api/Schema/Wiki/StudioSchema.php b/app/Scout/Elasticsearch/Api/Schema/Wiki/StudioSchema.php deleted file mode 100644 index c7221f307..000000000 --- a/app/Scout/Elasticsearch/Api/Schema/Wiki/StudioSchema.php +++ /dev/null @@ -1,51 +0,0 @@ -withIntermediatePaths([ - new AllowedInclude(new AnimeSchema(), Studio::RELATION_ANIME), - new AllowedInclude(new ExternalResourceSchema(), Studio::RELATION_RESOURCES), - new AllowedInclude(new ImageSchema(), Studio::RELATION_IMAGES), - ]); - } - - /** - * @return Field[] - */ - public function fields(): array - { - return array_merge( - parent::fields(), - [ - new IdField($this, Studio::ATTRIBUTE_ID), - new StudioNameField($this), - new StudioSlugField($this), - ], - ); - } -} diff --git a/app/Scout/Elasticsearch/Api/Schema/Wiki/ThemeSchema.php b/app/Scout/Elasticsearch/Api/Schema/Wiki/ThemeSchema.php deleted file mode 100644 index c6d3e5133..000000000 --- a/app/Scout/Elasticsearch/Api/Schema/Wiki/ThemeSchema.php +++ /dev/null @@ -1,84 +0,0 @@ -withIntermediatePaths([ - new AllowedInclude(new AnimeSchema(), Theme::RELATION_ANIME), - new AllowedInclude(new ArtistSchema(), Theme::RELATION_ARTISTS), - new AllowedInclude(new EntrySchema(), Theme::RELATION_ENTRIES), - new AllowedInclude(new ImageSchema(), Theme::RELATION_IMAGES), - new AllowedInclude(new SongSchema(), Theme::RELATION_SONG), - new AllowedInclude(new VideoSchema(), Theme::RELATION_VIDEOS), - ]); - } - - /** - * @return Field[] - */ - public function fields(): array - { - return array_merge( - parent::fields(), - [ - new IdField($this, Theme::ATTRIBUTE_ID), - new ThemeSequenceField($this), - new ThemeSlugField($this), - new ThemeTypeField($this), - ], - ); - } - - /** - * @return Sort[] - */ - public function sorts(): array - { - return array_merge( - parent::sorts(), - [ - new Sort(ThemeSchema::SORT_SEASON), - new Sort(ThemeSchema::SORT_TITLE, ThemeSchema::SORT_TITLE_FIELD), - new Sort(ThemeSchema::SORT_YEAR), - ] - ); - } - - public function model(): Theme - { - return new Theme(); - } -} diff --git a/app/Scout/Elasticsearch/Api/Schema/Wiki/VideoSchema.php b/app/Scout/Elasticsearch/Api/Schema/Wiki/VideoSchema.php deleted file mode 100644 index 758255af4..000000000 --- a/app/Scout/Elasticsearch/Api/Schema/Wiki/VideoSchema.php +++ /dev/null @@ -1,73 +0,0 @@ -withIntermediatePaths([ - new AllowedInclude(new AnimeSchema(), Video::RELATION_ANIME), - new AllowedInclude(new AudioSchema(), Video::RELATION_AUDIO), - new AllowedInclude(new EntrySchema(), Video::RELATION_ANIMETHEMEENTRIES), - new AllowedInclude(new GroupSchema(), Video::RELATION_GROUP), - new AllowedInclude(new ThemeSchema(), Video::RELATION_ANIMETHEME), - ]); - } - - /** - * @return Field[] - */ - public function fields(): array - { - return array_merge( - parent::fields(), - [ - new IdField($this, Video::ATTRIBUTE_ID), - new VideoBasenameField($this), - new VideoFilenameField($this), - new VideoLyricsField($this), - new VideoMimeTypeField($this), - new VideoNcField($this), - new VideoOverlapField($this), - new VideoPathField($this), - new VideoResolutionField($this), - new VideoSizeField($this), - new VideoSourceField($this), - new VideoSubbedField($this), - new VideoUncenField($this), - ], - ); - } -} diff --git a/app/Scout/Elasticsearch/Elasticsearch.php b/app/Scout/Elasticsearch/Elasticsearch.php deleted file mode 100644 index 275afe247..000000000 --- a/app/Scout/Elasticsearch/Elasticsearch.php +++ /dev/null @@ -1,236 +0,0 @@ -alive = $builder->default()->ping()->asBool(); - } catch (Exception $exception) { - Log::error($exception->getMessage()); - $this->alive = false; - } - } - - /** - * Is the ES instance reachable? - */ - public function isAlive(): bool - { - return $this->alive; - } - - /** - * Should the search be performed? - */ - public function shouldSearch(): bool - { - return $this->isAlive(); - } - - /** - * Perform the search. - */ - public function searchViaJSONAPI( - Query $query, - EloquentSchema $schema, - PaginationStrategy $paginationStrategy - ): Collection|Paginator { - $elasticSchema = $this->elasticSchema($schema); - - // initialize builder for matches - $searchBuilder = static::elasticQuery($elasticSchema->model()::class)->build($this->criteria); - $this->elasticBuilder = $searchBuilder; - - // load aggregate fields - $this->elasticBuilder->refineModels(function (EloquentBuilder $searchModelBuilder) use ($query, $schema): void { - $this->withAggregates($searchModelBuilder, $query, $schema); - }); - - // eager load relations with constraints - $this->elasticBuilder = $this->elasticBuilder->load($this->constrainEagerLoads($query, $schema)); - - // apply filters - $filterBuilder = new BoolQueryBuilder(); - $scope = ScopeParser::parse($schema->type()); - foreach ($query->getFilterCriteria() as $filterCriterion) { - $elasticFilterCriteria = FilterParser::parse($filterCriterion); - if ($elasticFilterCriteria instanceof Criteria) { - foreach ($elasticSchema->filters() as $filter) { - if ($filterCriterion->shouldFilter($filter, $scope)) { - $filterBuilder = $elasticFilterCriteria->filter($filterBuilder, $filter, $query); - } - } - } - } - try { - $this->elasticBuilder->postFilter($filterBuilder); - } catch (QueryBuilderValidationException) { - // There doesn't appear to be a way to check if any filters have been set in the filter builder - } - - // apply sorts - $sorts = []; - foreach ($query->getSortCriteria() as $sortCriterion) { - $elasticSortCriteria = SortParser::parse($sortCriterion); - if ($elasticSortCriteria instanceof Api\Criteria\Sort\Criteria) { - foreach ($elasticSchema->sorts() as $sort) { - if ($sortCriterion->shouldSort($sort, $scope)) { - $sorts[] = $elasticSortCriteria->sort($sort); - } - } - } - } - if ($sorts !== []) { - $this->elasticBuilder->sortRaw($sorts); - } - - // paginate - $paginationCriteria = $query->getPagingCriteria($paginationStrategy); - $elasticPaginationCriteria = PagingParser::parse($paginationCriteria); - - return $elasticPaginationCriteria instanceof Api\Criteria\Paging\Criteria - ? $elasticPaginationCriteria->paginate($this->elasticBuilder) - : $this->elasticBuilder->execute()->models(); - } - - /** - * @param Closure(EloquentBuilder): void $callback - * @param array $sorts - */ - public function search(?Closure $callback = null, int $perPage = 15, int $page = 1, array $sorts = []): LengthAwarePaginator - { - throw_unless($this->model instanceof Model, RuntimeException::class, 'Model must be provided for search.'); - - $searchBuilder = static::elasticQuery($this->model::class)->build($this->criteria); - $this->elasticBuilder = $searchBuilder; - - // Resolve callback. - if ($callback instanceof Closure) { - $this->elasticBuilder->refineModels($callback); - } - - // Resolve sorting. - $sortRaw = []; - foreach ($sorts as $column => $data) { - $nested = Arr::get($data, 'direction'); - if (Arr::get($data, 'isString') === true) { - if ($relation = Arr::get($data, 'relation')) { - $column = $relation.'.'.$column.'_keyword'; - - $nested = [ - 'order' => $nested, - 'nested' => [ - 'path' => $relation, - ], - ]; - } else { - $column .= '.keyword'; - } - } - - $sortRaw[$column] = $nested; - } - - if ($sortRaw !== []) { - $this->elasticBuilder->sortRaw($sortRaw); - } - - return $this->elasticBuilder->paginate($perPage, page: $page)->onlyModels(); - } - - /** - * @param class-string $model - */ - public static function elasticQuery(string $model): ElasticQuery - { - return match ($model) { - Playlist::class => new PlaylistQuery(), - Entry::class => new EntryQuery(), - Theme::class => new ThemeQuery(), - Anime::class => new AnimeQuery(), - Artist::class => new ArtistQuery(), - Series::class => new SeriesQuery(), - Song::class => new SongQuery(), - Studio::class => new StudioQuery(), - Video::class => new VideoQuery(), - default => throw new RuntimeException("No ElasticQuery defined for model: {$model}"), - }; - } - - /** - * Resolve Elasticsearch schema from Eloquent schema. - */ - private function elasticSchema(EloquentSchema $schema): Schema - { - $elasticSchemaClass = Str::of($schema::class) - ->replace('Http', 'Scout\\Elasticsearch') - ->__toString(); - - return new $elasticSchemaClass(); - } -} diff --git a/app/Scout/Elasticsearch/Models/List/ExternalProfileElasticModel.php b/app/Scout/Elasticsearch/Models/List/ExternalProfileElasticModel.php deleted file mode 100644 index 6809d18d8..000000000 --- a/app/Scout/Elasticsearch/Models/List/ExternalProfileElasticModel.php +++ /dev/null @@ -1,18 +0,0 @@ - - */ - public static function toSearchableArray(ExternalProfile $profile): array - { - return $profile->attributesToArray(); - } -} diff --git a/app/Scout/Elasticsearch/Models/List/PlaylistElasticModel.php b/app/Scout/Elasticsearch/Models/List/PlaylistElasticModel.php deleted file mode 100644 index fceff9075..000000000 --- a/app/Scout/Elasticsearch/Models/List/PlaylistElasticModel.php +++ /dev/null @@ -1,18 +0,0 @@ - - */ - public static function toSearchableArray(Playlist $playlist): array - { - return $playlist->attributesToArray(); - } -} diff --git a/app/Scout/Elasticsearch/Models/Wiki/AnimeElasticModel.php b/app/Scout/Elasticsearch/Models/Wiki/AnimeElasticModel.php deleted file mode 100644 index e10ec654b..000000000 --- a/app/Scout/Elasticsearch/Models/Wiki/AnimeElasticModel.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - public static function toSearchableArray(Anime $anime): array - { - return [ - ...$anime->attributesToArray(), - 'synonyms' => $anime->synonyms->map(fn (Synonym $synonym) => $synonym->text)->all(), - ]; - } -} diff --git a/app/Scout/Elasticsearch/Models/Wiki/ArtistElasticModel.php b/app/Scout/Elasticsearch/Models/Wiki/ArtistElasticModel.php deleted file mode 100644 index e471170fb..000000000 --- a/app/Scout/Elasticsearch/Models/Wiki/ArtistElasticModel.php +++ /dev/null @@ -1,30 +0,0 @@ - - */ - public static function toSearchableArray(Artist $artist): array - { - return [ - ...$artist->attributesToArray(), - 'synonyms' => $artist->synonyms->map(fn (Synonym $synonym) => $synonym->text)->all(), - 'as' => $artist->performances->map(fn (Performance $performance) => $performance->as) - ->toBase() - ->concat($artist->memberPerformances->map(fn (Performance $performance) => $performance->member_as)) - ->filter() - ->unique() - ->values() - ->all(), - ]; - } -} diff --git a/app/Scout/Elasticsearch/Models/Wiki/EntryElasticModel.php b/app/Scout/Elasticsearch/Models/Wiki/EntryElasticModel.php deleted file mode 100644 index 3b5911c9e..000000000 --- a/app/Scout/Elasticsearch/Models/Wiki/EntryElasticModel.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ - public static function toSearchableArray(Entry $entry): array - { - return [ - ...$entry->attributesToArray(), - 'theme' => $entry->animetheme->toSearchableArray(), - 'version' => Str::of(strval($entry->version))->prepend('v')->__toString(), - ]; - } -} diff --git a/app/Scout/Elasticsearch/Models/Wiki/SeriesElasticModel.php b/app/Scout/Elasticsearch/Models/Wiki/SeriesElasticModel.php deleted file mode 100644 index bb103e3da..000000000 --- a/app/Scout/Elasticsearch/Models/Wiki/SeriesElasticModel.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ - public static function toSearchableArray(Series $series): array - { - return [ - ...$series->attributesToArray(), - 'anime' => $series->anime->map( - fn (Anime $anime): array => $anime->toSearchableArray() - )->all(), - ]; - } -} diff --git a/app/Scout/Elasticsearch/Models/Wiki/SongElasticModel.php b/app/Scout/Elasticsearch/Models/Wiki/SongElasticModel.php deleted file mode 100644 index 5fed9c998..000000000 --- a/app/Scout/Elasticsearch/Models/Wiki/SongElasticModel.php +++ /dev/null @@ -1,18 +0,0 @@ - - */ - public static function toSearchableArray(Song $song): array - { - return $song->attributesToArray(); - } -} diff --git a/app/Scout/Elasticsearch/Models/Wiki/StudioElasticModel.php b/app/Scout/Elasticsearch/Models/Wiki/StudioElasticModel.php deleted file mode 100644 index 10bb5b0fc..000000000 --- a/app/Scout/Elasticsearch/Models/Wiki/StudioElasticModel.php +++ /dev/null @@ -1,18 +0,0 @@ - - */ - public static function toSearchableArray(Studio $studio): array - { - return $studio->attributesToArray(); - } -} diff --git a/app/Scout/Elasticsearch/Models/Wiki/ThemeElasticModel.php b/app/Scout/Elasticsearch/Models/Wiki/ThemeElasticModel.php deleted file mode 100644 index 22b94bef3..000000000 --- a/app/Scout/Elasticsearch/Models/Wiki/ThemeElasticModel.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ - public static function toSearchableArray(Theme $theme): array - { - $array = [ - ...$theme->attributesToArray(), - 'anime' => $theme->anime->attributesToArray(), - ]; - - if ($theme->song !== null) { - $array['song'] = $theme->song->toSearchableArray(); - } - - return $array; - } -} diff --git a/app/Scout/Elasticsearch/Models/Wiki/VideoElasticModel.php b/app/Scout/Elasticsearch/Models/Wiki/VideoElasticModel.php deleted file mode 100644 index 7b50992a3..000000000 --- a/app/Scout/Elasticsearch/Models/Wiki/VideoElasticModel.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ - public static function toSearchableArray(Video $video): array - { - return [ - ...$video->attributesToArray(), - 'entries' => $video->animethemeentries->map( - fn (Entry $entry): array => $entry->toSearchableArray() - )->all(), - ]; - } -} diff --git a/app/Scout/Search.php b/app/Scout/Search.php index 68e0338bb..1d9479fed 100644 --- a/app/Scout/Search.php +++ b/app/Scout/Search.php @@ -8,7 +8,6 @@ use App\Enums\Http\Api\Paging\PaginationStrategy; use App\Http\Api\Query\Query; use App\Http\Api\Schema\EloquentSchema; use App\Scout\Collection\CollectionSearch; -use App\Scout\Elasticsearch\Elasticsearch; use App\Scout\Typesense\Typesense; use Closure; use Illuminate\Contracts\Pagination\Paginator; @@ -33,7 +32,6 @@ abstract class Search return match ($driver = Config::get('scout.driver')) { 'collection' => App::make(CollectionSearch::class, ['model' => $model, 'criteria' => $criteria]), - 'elastic' => App::make(Elasticsearch::class, ['model' => $model, 'criteria' => $criteria]), 'typesense' => App::make(Typesense::class, ['model' => $model, 'criteria' => $criteria]), default => throw new RuntimeException("Unsupported {$driver} search driver configured."), }; diff --git a/app/Scout/Typesense/Models/List/ExternalProfileTypesenseModel.php b/app/Scout/Typesense/Models/List/ExternalProfileTypesenseModel.php deleted file mode 100644 index b76d256d2..000000000 --- a/app/Scout/Typesense/Models/List/ExternalProfileTypesenseModel.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - public static function toSearchableArray(ExternalProfile $profile): array - { - return [ - 'id' => (string) $profile->getKey(), - 'name' => $profile->name, - 'site' => $profile->site->value, - ]; - } -} diff --git a/app/Scout/Typesense/Models/List/PlaylistTypesenseModel.php b/app/Scout/Typesense/Models/List/PlaylistTypesenseModel.php deleted file mode 100644 index c4d338fe4..000000000 --- a/app/Scout/Typesense/Models/List/PlaylistTypesenseModel.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - public static function toSearchableArray(Playlist $playlist): array - { - return [ - 'id' => (string) $playlist->getKey(), - 'name' => $playlist->name, - 'created_at' => $playlist->created_at?->timestamp, - ]; - } -} diff --git a/app/Scout/Typesense/Models/Wiki/AnimeTypesenseModel.php b/app/Scout/Typesense/Models/Wiki/AnimeTypesenseModel.php deleted file mode 100644 index 6ee306fe7..000000000 --- a/app/Scout/Typesense/Models/Wiki/AnimeTypesenseModel.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ - public static function toSearchableArray(Anime $anime): array - { - return [ - 'id' => (string) $anime->getKey(), - 'format' => $anime->format?->value, - 'title' => $anime->title, - // So TypeSense does not boost when alternative titles are the same. - 'title_english' => $anime->title_english !== $anime->title - ? $anime->title_english - : null, - 'title_native' => $anime->title_native !== $anime->title - ? $anime->title_native - : null, - 'season' => $anime->season?->value, - 'year' => $anime->year, - 'created_at' => $anime->created_at->timestamp, - 'synonyms' => $anime->synonyms->map(fn (Synonym $synonym) => $synonym->text)->all(), - ]; - } -} diff --git a/app/Scout/Typesense/Models/Wiki/ArtistTypesenseModel.php b/app/Scout/Typesense/Models/Wiki/ArtistTypesenseModel.php deleted file mode 100644 index 2e9d7eb6a..000000000 --- a/app/Scout/Typesense/Models/Wiki/ArtistTypesenseModel.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ - public static function toSearchableArray(Artist $artist): array - { - return [ - 'id' => (string) $artist->getKey(), - 'name' => $artist->name, - // So TypeSense does not boost when alternative names are the same. - 'name_native' => $artist->name_native !== $artist->name ? $artist->name : null, - 'created_at' => $artist->created_at->timestamp, - 'synonyms' => $synonyms = $artist->synonyms->map(fn (Synonym $synonym) => $synonym->text)->all(), - 'as' => $as = $artist->performances->map(fn (Performance $performance) => $performance->as) - ->toBase() - ->concat($artist->memberPerformances->map(fn (Performance $performance) => $performance->member_as)) - ->filter() - ->unique() - ->values() - ->all(), - 'search_text' => implode(' ', [ - $artist->name, - $artist->name_native, - ...$synonyms, - // ...$as, - ]), - ]; - } -} diff --git a/app/Scout/Typesense/Models/Wiki/EntryTypesenseModel.php b/app/Scout/Typesense/Models/Wiki/EntryTypesenseModel.php deleted file mode 100644 index 526739aa3..000000000 --- a/app/Scout/Typesense/Models/Wiki/EntryTypesenseModel.php +++ /dev/null @@ -1,25 +0,0 @@ - - */ - public static function toSearchableArray(Entry $entry): array - { - return [ - 'id' => (string) $entry->getKey(), - 'theme' => $entry->theme->toSearchableArray(), - 'version' => $version = Str::of(strval($entry->version))->prepend('v')->__toString(), - 'type_sequence_version' => $entry->theme->type->localize().(($entry->theme->sequence ?? 1)).$version, - 'created_at' => $entry->created_at->timestamp, - ]; - } -} diff --git a/app/Scout/Typesense/Models/Wiki/SeriesTypesenseModel.php b/app/Scout/Typesense/Models/Wiki/SeriesTypesenseModel.php deleted file mode 100644 index d5cc3b6f4..000000000 --- a/app/Scout/Typesense/Models/Wiki/SeriesTypesenseModel.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ - public static function toSearchableArray(Series $series): array - { - return [ - 'id' => (string) $series->getKey(), - 'title' => $series->title, - 'created_at' => $series->created_at->timestamp, - 'anime' => $series->anime->map( - fn (Anime $anime): array => $anime->toSearchableArray() - )->all(), - ]; - } -} diff --git a/app/Scout/Typesense/Models/Wiki/SongTypesenseModel.php b/app/Scout/Typesense/Models/Wiki/SongTypesenseModel.php deleted file mode 100644 index 6d025b4c5..000000000 --- a/app/Scout/Typesense/Models/Wiki/SongTypesenseModel.php +++ /dev/null @@ -1,24 +0,0 @@ - - */ - public static function toSearchableArray(Song $song): array - { - return [ - 'id' => (string) $song->getKey(), - 'title' => $song->title, - // So TypeSense does not boost when alternative titles are the same. - 'title_native' => $song->title_native !== $song->title ? $song->title_native : null, - 'created_at' => $song->created_at->timestamp, - ]; - } -} diff --git a/app/Scout/Typesense/Models/Wiki/StudioTypesenseModel.php b/app/Scout/Typesense/Models/Wiki/StudioTypesenseModel.php deleted file mode 100644 index 0b74033ca..000000000 --- a/app/Scout/Typesense/Models/Wiki/StudioTypesenseModel.php +++ /dev/null @@ -1,22 +0,0 @@ - - */ - public static function toSearchableArray(Studio $studio): array - { - return [ - 'id' => (string) $studio->getKey(), - 'name' => $studio->name, - 'created_at' => $studio->created_at->timestamp, - ]; - } -} diff --git a/app/Scout/Typesense/Models/Wiki/ThemeTypesenseModel.php b/app/Scout/Typesense/Models/Wiki/ThemeTypesenseModel.php deleted file mode 100644 index 2c59d3a2f..000000000 --- a/app/Scout/Typesense/Models/Wiki/ThemeTypesenseModel.php +++ /dev/null @@ -1,29 +0,0 @@ - - */ - public static function toSearchableArray(Theme $theme): array - { - return [ - 'id' => (string) $theme->getKey(), - 'created_at' => $theme->created_at->timestamp, - - 'type_sequence' => $theme->type->localize().($theme->sequence ?? 1), - 'type' => $theme->type->value, - 'sequence' => $theme->sequence ?? 1, - - 'anime' => $theme->anime->toSearchableArray(), - 'song' => $theme->song?->toSearchableArray(), - 'song_title' => $theme->song?->title, - ]; - } -} diff --git a/app/Scout/Typesense/Models/Wiki/VideoTypesenseModel.php b/app/Scout/Typesense/Models/Wiki/VideoTypesenseModel.php deleted file mode 100644 index 4f37925f3..000000000 --- a/app/Scout/Typesense/Models/Wiki/VideoTypesenseModel.php +++ /dev/null @@ -1,27 +0,0 @@ - - */ - public static function toSearchableArray(Video $video): array - { - return [ - 'id' => (string) $video->getKey(), - 'filename' => $video->filename, - 'tags' => $video->tags, - 'created_at' => $video->created_at->timestamp, - 'entries' => $video->animethemeentries->map( - fn (Entry $entry): array => $entry->toSearchableArray() - )->all(), - ]; - } -} diff --git a/composer.json b/composer.json index b2a94b390..07e9acdaf 100644 --- a/composer.json +++ b/composer.json @@ -24,10 +24,6 @@ "ext-gd": "*", "ext-pdo": "*", "awcodes/recently": "^3.1.0", - "babenkoivan/elastic-adapter": "^5.1", - "babenkoivan/elastic-migrations": "^5", - "babenkoivan/elastic-scout-driver": "^6", - "babenkoivan/elastic-scout-driver-plus": "^7", "bepsvpt/secure-headers": "^7.5", "elemind/filament-echarts": "^1.1.1", "fakerphp/faker": "^1.24.1", @@ -38,7 +34,7 @@ "larastan/larastan": "^3.10.0", "laravel-notification-channels/discord": "^1.8", "laravel/fortify": "^1.39.0", - "laravel/framework": "^13.29.0", + "laravel/framework": "^13.32.0", "laravel/pennant": "^1.26.0", "laravel/pulse": "^1.8.1", "laravel/sanctum": "^4.3.3", @@ -69,9 +65,9 @@ "laravel/pint": "^1.30.5", "laravel/sail": "^1.67.0", "mockery/mockery": "^1.6.15", - "mrpunyapal/rector-pest": "^0.2.17", - "pestphp/pest": "^4.7.8", - "pestphp/pest-plugin-laravel": "^4.1", + "pestphp/pest": "^5.2.1", + "pestphp/pest-plugin-laravel": "^5.0.1", + "pestphp/pest-plugin-rector": "^5.0", "predis/predis": "^2.4.1", "rector/rector": "^2.6.6" }, diff --git a/composer.lock b/composer.lock index 2d94e0697..f5d68aaa4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cf8948bbcd1a53d101c87954ae6f9aa3", + "content-hash": "4d6ae02bc9505d39d1aee2d0dbfdcee5", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -299,367 +299,6 @@ }, "time": "2026-08-27T18:54:08+00:00" }, - { - "name": "babenkoivan/elastic-adapter", - "version": "v5.1.0", - "source": { - "type": "git", - "url": "https://github.com/babenkoivan/elastic-adapter.git", - "reference": "106d938c4ec0f99eb7d136925f68bc6e26ccdf03" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/babenkoivan/elastic-adapter/zipball/106d938c4ec0f99eb7d136925f68bc6e26ccdf03", - "reference": "106d938c4ec0f99eb7d136925f68bc6e26ccdf03", - "shasum": "" - }, - "require": { - "babenkoivan/elastic-client": "^4.0", - "php": "^8.2" - }, - "require-dev": { - "dg/bypass-finals": "^1.7", - "friendsofphp/php-cs-fixer": "^3.14", - "orchestra/testbench": "^10.0", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Elastic\\Adapter\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ivan Babenko", - "email": "babenko.i.a@gmail.com" - } - ], - "description": "Adapter for official PHP Elasticsearch client", - "keywords": [ - "adapter", - "client", - "elastic", - "elasticsearch", - "php" - ], - "support": { - "issues": "https://github.com/babenkoivan/elastic-adapter/issues", - "source": "https://github.com/babenkoivan/elastic-adapter/tree/v5.1.0" - }, - "funding": [ - { - "url": "https://ko-fi.com/ivanbabenko", - "type": "ko-fi" - }, - { - "url": "https://paypal.me/babenkoi", - "type": "paypal" - } - ], - "time": "2026-02-16T17:46:08+00:00" - }, - { - "name": "babenkoivan/elastic-client", - "version": "v4.0.1", - "source": { - "type": "git", - "url": "https://github.com/babenkoivan/elastic-client.git", - "reference": "362649a61082ad973d37fa729e5273fa3e32ef12" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/babenkoivan/elastic-client/zipball/362649a61082ad973d37fa729e5273fa3e32ef12", - "reference": "362649a61082ad973d37fa729e5273fa3e32ef12", - "shasum": "" - }, - "require": { - "elasticsearch/elasticsearch": "^9.0", - "php": "^8.2" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^3.14", - "orchestra/testbench": "^10.0", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Elastic\\Client\\ServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Elastic\\Client\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ivan Babenko", - "email": "babenko.i.a@gmail.com" - } - ], - "description": "The official PHP Elasticsearch client integrated with Laravel", - "keywords": [ - "client", - "elastic", - "elasticsearch", - "laravel", - "php" - ], - "support": { - "issues": "https://github.com/babenkoivan/elastic-client/issues", - "source": "https://github.com/babenkoivan/elastic-client/tree/v4.0.1" - }, - "funding": [ - { - "url": "https://ko-fi.com/ivanbabenko", - "type": "ko-fi" - }, - { - "url": "https://paypal.me/babenkoi", - "type": "paypal" - } - ], - "time": "2025-11-16T12:13:35+00:00" - }, - { - "name": "babenkoivan/elastic-migrations", - "version": "v5.0.0", - "source": { - "type": "git", - "url": "https://github.com/babenkoivan/elastic-migrations.git", - "reference": "e352a6e905cc1969afdee76d4fadb05837c23406" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/babenkoivan/elastic-migrations/zipball/e352a6e905cc1969afdee76d4fadb05837c23406", - "reference": "e352a6e905cc1969afdee76d4fadb05837c23406", - "shasum": "" - }, - "require": { - "babenkoivan/elastic-adapter": "^5.0", - "php": "^8.2" - }, - "require-dev": { - "dg/bypass-finals": "^1.7", - "friendsofphp/php-cs-fixer": "^3.14", - "orchestra/testbench": "^10.0", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Elastic\\Migrations\\ServiceProvider" - ] - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Elastic\\Migrations\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ivan Babenko", - "email": "babenko.i.a@gmail.com" - } - ], - "description": "Elasticsearch migrations for Laravel", - "keywords": [ - "elastic", - "elasticsearch", - "laravel", - "migrations", - "php" - ], - "support": { - "issues": "https://github.com/babenkoivan/elastic-migrations/issues", - "source": "https://github.com/babenkoivan/elastic-migrations/tree/v5.0.0" - }, - "funding": [ - { - "url": "https://ko-fi.com/ivanbabenko", - "type": "ko-fi" - }, - { - "url": "https://paypal.me/babenkoi", - "type": "paypal" - } - ], - "time": "2025-11-16T12:22:07+00:00" - }, - { - "name": "babenkoivan/elastic-scout-driver", - "version": "v6.0.0", - "source": { - "type": "git", - "url": "https://github.com/babenkoivan/elastic-scout-driver.git", - "reference": "de23e6af3962f6df1402acb5043e0c2de1e6f169" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/babenkoivan/elastic-scout-driver/zipball/de23e6af3962f6df1402acb5043e0c2de1e6f169", - "reference": "de23e6af3962f6df1402acb5043e0c2de1e6f169", - "shasum": "" - }, - "require": { - "babenkoivan/elastic-adapter": "^5.0", - "php": "^8.3" - }, - "require-dev": { - "babenkoivan/elastic-migrations": "^5.0", - "friendsofphp/php-cs-fixer": "^3.14", - "laravel/legacy-factories": "^1.3", - "laravel/scout": "^11.0", - "orchestra/testbench": "^11.0", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Elastic\\ScoutDriver\\ServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Elastic\\ScoutDriver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ivan Babenko", - "email": "babenko.i.a@gmail.com" - } - ], - "description": "Elasticsearch driver for Laravel Scout", - "keywords": [ - "driver", - "elastic", - "elasticsearch", - "laravel", - "php", - "scout" - ], - "support": { - "issues": "https://github.com/babenkoivan/elastic-scout-driver/issues", - "source": "https://github.com/babenkoivan/elastic-scout-driver/tree/v6.0.0" - }, - "funding": [ - { - "url": "https://ko-fi.com/ivanbabenko", - "type": "ko-fi" - }, - { - "url": "https://paypal.me/babenkoi", - "type": "paypal" - } - ], - "time": "2026-03-23T19:26:58+00:00" - }, - { - "name": "babenkoivan/elastic-scout-driver-plus", - "version": "v7.0.0", - "source": { - "type": "git", - "url": "https://github.com/babenkoivan/elastic-scout-driver-plus.git", - "reference": "72f9878603f4b5736ce00e1f97a9311a9250568c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/babenkoivan/elastic-scout-driver-plus/zipball/72f9878603f4b5736ce00e1f97a9311a9250568c", - "reference": "72f9878603f4b5736ce00e1f97a9311a9250568c", - "shasum": "" - }, - "require": { - "babenkoivan/elastic-scout-driver": "^6.0", - "php": "^8.3" - }, - "require-dev": { - "babenkoivan/elastic-migrations": "^5.0", - "friendsofphp/php-cs-fixer": "^3.14", - "laravel/legacy-factories": "^1.3", - "laravel/scout": "^11.0", - "orchestra/testbench": "^11.0", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^11.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Elastic\\ScoutDriverPlus\\ServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "Elastic\\ScoutDriverPlus\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ivan Babenko", - "email": "babenko.i.a@gmail.com" - } - ], - "description": "Extension for Elastic Scout Driver", - "keywords": [ - "driver", - "elastic", - "elasticsearch", - "laravel", - "php", - "scout" - ], - "support": { - "issues": "https://github.com/babenkoivan/elastic-scout-driver-plus/issues", - "source": "https://github.com/babenkoivan/elastic-scout-driver-plus/tree/v7.0.0" - }, - "funding": [ - { - "url": "https://ko-fi.com/ivanbabenko", - "type": "ko-fi" - }, - { - "url": "https://paypal.me/babenkoi", - "type": "paypal" - } - ], - "time": "2026-03-23T20:18:14+00:00" - }, { "name": "bacon/bacon-qr-code", "version": "v3.1.1", @@ -945,16 +584,16 @@ }, { "name": "brick/math", - "version": "0.18.0", + "version": "0.19.1", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "82944324d1c1bdb2c2618e89978d4e2ad78d69ad" + "reference": "a89bc96a7cf3d7b59e725afe57ccb95eb03cf6ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/82944324d1c1bdb2c2618e89978d4e2ad78d69ad", - "reference": "82944324d1c1bdb2c2618e89978d4e2ad78d69ad", + "url": "https://api.github.com/repos/brick/math/zipball/a89bc96a7cf3d7b59e725afe57ccb95eb03cf6ce", + "reference": "a89bc96a7cf3d7b59e725afe57ccb95eb03cf6ce", "shasum": "" }, "require": { @@ -992,7 +631,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.18.0" + "source": "https://github.com/brick/math/tree/0.19.1" }, "funding": [ { @@ -1000,20 +639,20 @@ "type": "github" } ], - "time": "2026-06-14T18:21:03+00:00" + "time": "2026-08-08T23:03:16+00:00" }, { "name": "carbonphp/carbon-doctrine-types", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", - "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d" + "reference": "5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d", - "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc", + "reference": "5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc", "shasum": "" }, "require": { @@ -1028,6 +667,11 @@ "phpunit/phpunit": "^10.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { "psr-4": { "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" @@ -1053,7 +697,7 @@ ], "support": { "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", - "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.1" }, "funding": [ { @@ -1069,7 +713,7 @@ "type": "tidelift" } ], - "time": "2024-02-09T16:56:22+00:00" + "time": "2026-09-06T14:11:38+00:00" }, { "name": "chillerlan/php-qrcode", @@ -1669,27 +1313,25 @@ }, { "name": "doctrine/lexer", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" + "reference": "e96fe45e92a54233726014a7cc7340abf29bb14c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e96fe45e92a54233726014a7cc7340abf29bb14c", + "reference": "e96fe45e92a54233726014a7cc7340abf29bb14c", "shasum": "" }, "require": { "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.21" + "doctrine/coding-standard": "^14", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^10.5.58 || ^12.5.4" }, "type": "library", "autoload": { @@ -1726,7 +1368,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.1" + "source": "https://github.com/doctrine/lexer/tree/3.0.2" }, "funding": [ { @@ -1742,7 +1384,7 @@ "type": "tidelift" } ], - "time": "2024-02-05T11:56:58+00:00" + "time": "2026-06-14T20:44:06+00:00" }, { "name": "doctrine/sql-formatter", @@ -1930,122 +1572,6 @@ ], "time": "2025-03-06T22:45:56+00:00" }, - { - "name": "elastic/transport", - "version": "v9.0.1", - "source": { - "type": "git", - "url": "https://github.com/elastic/elastic-transport-php.git", - "reference": "3488b9d070e220f2a1ebdb500e6c588069f1897f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/elastic/elastic-transport-php/zipball/3488b9d070e220f2a1ebdb500e6c588069f1897f", - "reference": "3488b9d070e220f2a1ebdb500e6c588069f1897f", - "shasum": "" - }, - "require": { - "composer-runtime-api": "^2.0", - "nyholm/psr7": "^1.8", - "open-telemetry/api": "^1.0", - "php": "^8.1", - "php-http/discovery": "^1.14", - "php-http/httplug": "^2.4", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^2.0", - "psr/log": "^2.0 || ^3.0" - }, - "require-dev": { - "open-telemetry/sdk": "^1.0", - "php-http/mock-client": "^1.5", - "phpstan/phpstan": "^2.1", - "phpunit/phpunit": "^10", - "symfony/http-client": "^6.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Elastic\\Transport\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "HTTP transport PHP library for Elastic products", - "keywords": [ - "PSR_17", - "elastic", - "http", - "psr-18", - "psr-7", - "transport" - ], - "support": { - "issues": "https://github.com/elastic/elastic-transport-php/issues", - "source": "https://github.com/elastic/elastic-transport-php/tree/v9.0.1" - }, - "time": "2025-05-08T12:31:50+00:00" - }, - { - "name": "elasticsearch/elasticsearch", - "version": "v9.5.0", - "source": { - "type": "git", - "url": "https://github.com/elastic/elasticsearch-php.git", - "reference": "6fe5f99ea3a8b697f8c098399cc84d2339a9508d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/6fe5f99ea3a8b697f8c098399cc84d2339a9508d", - "reference": "6fe5f99ea3a8b697f8c098399cc84d2339a9508d", - "shasum": "" - }, - "require": { - "elastic/transport": "^9.0", - "php": "^8.1", - "psr/http-client": "^1.0", - "psr/http-message": "^2.0", - "psr/log": "^2.0|^3.0" - }, - "require-dev": { - "ext-yaml": "*", - "ext-zip": "*", - "guzzlehttp/guzzle": "^7.0", - "mockery/mockery": "^1.6", - "nette/php-generator": "^4.0", - "nyholm/psr7": "^1.8", - "php-http/mock-client": "^1.6", - "phpstan/phpstan": "^2.1", - "phpunit/phpunit": "^10.0", - "psr/http-factory": "^1.0", - "symfony/finder": "^6.0", - "symfony/http-client": "^6.0|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Elastic\\Elasticsearch\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHP Client for Elasticsearch", - "keywords": [ - "client", - "elastic", - "elasticsearch", - "search" - ], - "support": { - "issues": "https://github.com/elastic/elasticsearch-php/issues", - "source": "https://github.com/elastic/elasticsearch-php/tree/v9.5.0" - }, - "time": "2026-08-04T14:31:01+00:00" - }, { "name": "elemind/filament-echarts", "version": "1.1.1", @@ -3949,16 +3475,16 @@ }, { "name": "laravel/framework", - "version": "v13.29.0", + "version": "v13.32.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "6e2c363716964d8238cee7097b258119a984f0cf" + "reference": "cdd8b33c246719acdd118c705ce8c7ab5ef48a96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/6e2c363716964d8238cee7097b258119a984f0cf", - "reference": "6e2c363716964d8238cee7097b258119a984f0cf", + "url": "https://api.github.com/repos/laravel/framework/zipball/cdd8b33c246719acdd118c705ce8c7ab5ef48a96", + "reference": "cdd8b33c246719acdd118c705ce8c7ab5ef48a96", "shasum": "" }, "require": { @@ -4077,15 +3603,17 @@ "orchestra/testbench-core": "^11.0.0", "pda/pheanstalk": "^7.0.0 || ^8.0.0", "php-http/discovery": "^1.15", - "phpstan/phpstan": "^2.0", + "phpstan/phpstan": "^2.2.14", "phpunit/phpunit": "^11.5.50 || ^12.5.8 || ^13.0.3", "predis/predis": "^2.3 || ^3.0", "rector/rector": "2.6.3", "resend/resend-php": "^1.0", "symfony/cache": "^7.4.0 || ^8.0.0", "symfony/http-client": "^7.4.0 || ^8.0.0", + "symfony/mercure": "^0.8.0", "symfony/psr-http-message-bridge": "^7.4.0 || ^8.0.0", - "symfony/translation": "^7.4.0 || ^8.0.0" + "symfony/translation": "^7.4.0 || ^8.0.0", + "web-token/jwt-library": "^4.1" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", @@ -4121,8 +3649,10 @@ "symfony/filesystem": "Required to enable support for relative symbolic links (^7.4 || ^8.0).", "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.4 || ^8.0).", "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.4 || ^8.0).", + "symfony/mercure": "Required to use the Mercure broadcast driver (^0.8).", "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.4 || ^8.0).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.4 || ^8.0)." + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.4 || ^8.0).", + "web-token/jwt-library": "Required to sign Mercure JWTs and use end-to-end encrypted channels (^4.1)." }, "type": "library", "extra": { @@ -4172,7 +3702,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2026-08-25T20:57:16+00:00" + "time": "2026-09-15T14:55:30+00:00" }, { "name": "laravel/passkeys", @@ -4799,16 +4329,16 @@ }, { "name": "league/commonmark", - "version": "2.10.0", + "version": "2.10.1", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "d2d1aa8b35e072966c89bc0c66cf926e56767dc4" + "reference": "9d489ab67a02960fd8ffe624d93f751daf95439e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/d2d1aa8b35e072966c89bc0c66cf926e56767dc4", - "reference": "d2d1aa8b35e072966c89bc0c66cf926e56767dc4", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/9d489ab67a02960fd8ffe624d93f751daf95439e", + "reference": "9d489ab67a02960fd8ffe624d93f751daf95439e", "shasum": "" }, "require": { @@ -4902,7 +4432,7 @@ "type": "tidelift" } ], - "time": "2026-08-11T16:06:25+00:00" + "time": "2026-09-07T13:44:26+00:00" }, { "name": "league/config", @@ -5079,16 +4609,16 @@ }, { "name": "league/flysystem", - "version": "3.35.3", + "version": "3.36.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "5fc8404762179ae514678487b23494fd69b2309c" + "reference": "f7fb152932f30072d573510cbd4dd657d6475b25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5fc8404762179ae514678487b23494fd69b2309c", - "reference": "5fc8404762179ae514678487b23494fd69b2309c", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f7fb152932f30072d573510cbd4dd657d6475b25", + "reference": "f7fb152932f30072d573510cbd4dd657d6475b25", "shasum": "" }, "require": { @@ -5156,9 +4686,9 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.35.3" + "source": "https://github.com/thephpleague/flysystem/tree/3.36.0" }, - "time": "2026-08-22T12:55:54+00:00" + "time": "2026-09-02T08:00:27+00:00" }, { "name": "league/flysystem-aws-s3-v3", @@ -5783,16 +5313,16 @@ }, { "name": "monolog/monolog", - "version": "3.10.0", + "version": "3.12.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0" + "reference": "72c534fc0ab181ef52d92a68382318631e301608" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/b321dd6749f0bf7189444158a3ce785cc16d69b0", - "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/72c534fc0ab181ef52d92a68382318631e301608", + "reference": "72c534fc0ab181ef52d92a68382318631e301608", "shasum": "" }, "require": { @@ -5818,6 +5348,7 @@ "phpstan/phpstan-strict-rules": "^2", "phpunit/phpunit": "^10.5.17 || ^11.0.7", "predis/predis": "^1.1 || ^2", + "psr/clock": "^1.0", "rollbar/rollbar": "^4.0", "ruflin/elastica": "^7 || ^8", "symfony/mailer": "^5.4 || ^6", @@ -5836,6 +5367,7 @@ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "psr/clock": "Required to pass a clock to the Logger and control the timestamp of log records", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, @@ -5870,7 +5402,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.10.0" + "source": "https://github.com/Seldaek/monolog/tree/3.12.0" }, "funding": [ { @@ -5882,7 +5414,7 @@ "type": "tidelift" } ], - "time": "2026-01-02T08:56:05+00:00" + "time": "2026-09-09T08:34:20+00:00" }, { "name": "mtdowling/jmespath.php", @@ -5952,16 +5484,16 @@ }, { "name": "nesbot/carbon", - "version": "3.13.2", + "version": "3.14.0", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon.git", - "reference": "a1c54919f5fff9800cd03c32bd01defd5a4061cb" + "reference": "0023eaa2c9110e47446dd512a263c69c40cd41f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/a1c54919f5fff9800cd03c32bd01defd5a4061cb", - "reference": "a1c54919f5fff9800cd03c32bd01defd5a4061cb", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/0023eaa2c9110e47446dd512a263c69c40cd41f2", + "reference": "0023eaa2c9110e47446dd512a263c69c40cd41f2", "shasum": "" }, "require": { @@ -6053,7 +5585,7 @@ "type": "tidelift" } ], - "time": "2026-08-08T11:40:35+00:00" + "time": "2026-09-12T20:45:19+00:00" }, { "name": "nette/php-generator", @@ -6289,16 +5821,16 @@ }, { "name": "nikic/php-parser", - "version": "v5.8.0", + "version": "v5.9.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f" + "reference": "9e33da9553fe7786f0962b35f4e4ecf01be89def" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/044a6a392ff8ad0d61f14370a5fbbd0a0107152f", - "reference": "044a6a392ff8ad0d61f14370a5fbbd0a0107152f", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9e33da9553fe7786f0962b35f4e4ecf01be89def", + "reference": "9e33da9553fe7786f0962b35f4e4ecf01be89def", "shasum": "" }, "require": { @@ -6340,9 +5872,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.8.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.9.0" }, - "time": "2026-07-04T14:30:18+00:00" + "time": "2026-09-13T18:51:52+00:00" }, { "name": "nunomaduro/termwind", @@ -6640,135 +6172,6 @@ ], "time": "2024-09-09T07:06:30+00:00" }, - { - "name": "open-telemetry/api", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/opentelemetry-php/api.git", - "reference": "7c029c4a6fd457094a20569bf98f93d95e9a7559" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/7c029c4a6fd457094a20569bf98f93d95e9a7559", - "reference": "7c029c4a6fd457094a20569bf98f93d95e9a7559", - "shasum": "" - }, - "require": { - "open-telemetry/context": "^1.4", - "php": "^8.1", - "psr/log": "^1.1|^2.0|^3.0", - "symfony/polyfill-php82": "^1.26" - }, - "conflict": { - "open-telemetry/sdk": "<=1.11" - }, - "type": "library", - "extra": { - "spi": { - "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\HookManagerInterface": [ - "OpenTelemetry\\API\\Instrumentation\\AutoInstrumentation\\ExtensionHookManager" - ] - }, - "branch-alias": { - "dev-main": "1.8.x-dev" - } - }, - "autoload": { - "files": [ - "Trace/functions.php" - ], - "psr-4": { - "OpenTelemetry\\API\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "opentelemetry-php contributors", - "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors" - } - ], - "description": "API for OpenTelemetry PHP.", - "keywords": [ - "Metrics", - "api", - "apm", - "logging", - "opentelemetry", - "otel", - "tracing" - ], - "support": { - "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V", - "docs": "https://opentelemetry.io/docs/languages/php", - "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", - "source": "https://github.com/open-telemetry/opentelemetry-php" - }, - "time": "2026-07-06T12:28:04+00:00" - }, - { - "name": "open-telemetry/context", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/opentelemetry-php/context.git", - "reference": "3c414b246e0dabb7d6145404e6a5e4536ca18d07" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/context/zipball/3c414b246e0dabb7d6145404e6a5e4536ca18d07", - "reference": "3c414b246e0dabb7d6145404e6a5e4536ca18d07", - "shasum": "" - }, - "require": { - "php": "^8.1", - "symfony/polyfill-php82": "^1.26" - }, - "suggest": { - "ext-ffi": "To allow context switching in Fibers" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.0.x-dev" - } - }, - "autoload": { - "files": [ - "fiber/initialize_fiber_handler.php" - ], - "psr-4": { - "OpenTelemetry\\Context\\": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "opentelemetry-php contributors", - "homepage": "https://github.com/open-telemetry/opentelemetry-php/graphs/contributors" - } - ], - "description": "Context implementation for OpenTelemetry PHP.", - "keywords": [ - "Context", - "opentelemetry", - "otel" - ], - "support": { - "chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V", - "docs": "https://opentelemetry.io/docs/languages/php", - "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", - "source": "https://github.com/open-telemetry/opentelemetry-php" - }, - "time": "2025-10-19T06:44:33+00:00" - }, { "name": "openspout/openspout", "version": "v4.32.0", @@ -7592,16 +6995,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "2.3.3", + "version": "2.3.5", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "fb19eedd2bb67ff8cf7a5502ad329e701d6398a3" + "reference": "148cefffaf0233e4c08cc13db8a195a56dd6dfe9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fb19eedd2bb67ff8cf7a5502ad329e701d6398a3", - "reference": "fb19eedd2bb67ff8cf7a5502ad329e701d6398a3", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/148cefffaf0233e4c08cc13db8a195a56dd6dfe9", + "reference": "148cefffaf0233e4c08cc13db8a195a56dd6dfe9", "shasum": "" }, "require": { @@ -7633,9 +7036,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.3" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.5" }, - "time": "2026-07-08T07:01:06+00:00" + "time": "2026-08-31T16:05:28+00:00" }, { "name": "phpstan/phpstan", @@ -8522,20 +7925,20 @@ }, { "name": "ramsey/uuid", - "version": "4.9.3", + "version": "4.9.4", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "1df15849d00943a67d677dc9cfd80795f038c9f8" + "reference": "75d73f48d02797c2c285a7e9f348fadc0102ffe2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/1df15849d00943a67d677dc9cfd80795f038c9f8", - "reference": "1df15849d00943a67d677dc9cfd80795f038c9f8", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/75d73f48d02797c2c285a7e9f348fadc0102ffe2", + "reference": "75d73f48d02797c2c285a7e9f348fadc0102ffe2", "shasum": "" }, "require": { - "brick/math": ">=0.8.16 <=0.18", + "brick/math": "^0.8.16 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14 || ^0.15 || ^0.16 || ^0.17 || ^0.18 || ^0.19 || ^0.20 || ^1.0", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" }, @@ -8594,9 +7997,9 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.9.3" + "source": "https://github.com/ramsey/uuid/tree/4.9.4" }, - "time": "2026-06-18T03:57:49+00:00" + "time": "2026-09-16T11:39:30+00:00" }, { "name": "ryangjchandler/blade-capture-directive", @@ -9877,16 +9280,16 @@ }, { "name": "symfony/console", - "version": "v8.1.5", + "version": "v8.1.7", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "d07c06839e33047e2c894a6793248f3fb66c8129" + "reference": "29afb89f4e941f68a6e90f28e3f52ff1f6793a7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/d07c06839e33047e2c894a6793248f3fb66c8129", - "reference": "d07c06839e33047e2c894a6793248f3fb66c8129", + "url": "https://api.github.com/repos/symfony/console/zipball/29afb89f4e941f68a6e90f28e3f52ff1f6793a7d", + "reference": "29afb89f4e941f68a6e90f28e3f52ff1f6793a7d", "shasum": "" }, "require": { @@ -9953,7 +9356,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v8.1.5" + "source": "https://github.com/symfony/console/tree/v8.1.7" }, "funding": [ { @@ -9973,20 +9376,20 @@ "type": "tidelift" } ], - "time": "2026-08-21T14:29:57+00:00" + "time": "2026-09-13T10:55:57+00:00" }, { "name": "symfony/css-selector", - "version": "v8.1.5", + "version": "v8.1.6", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "a291fb5adb65f52a4bb315db2d803698315dc64d" + "reference": "08e2905152a39cf3fd1745d83f8c483e258887d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/a291fb5adb65f52a4bb315db2d803698315dc64d", - "reference": "a291fb5adb65f52a4bb315db2d803698315dc64d", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/08e2905152a39cf3fd1745d83f8c483e258887d9", + "reference": "08e2905152a39cf3fd1745d83f8c483e258887d9", "shasum": "" }, "require": { @@ -10022,7 +9425,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v8.1.5" + "source": "https://github.com/symfony/css-selector/tree/v8.1.6" }, "funding": [ { @@ -10042,7 +9445,7 @@ "type": "tidelift" } ], - "time": "2026-08-21T17:47:34+00:00" + "time": "2026-08-23T10:06:25+00:00" }, { "name": "symfony/deprecation-contracts", @@ -10435,16 +9838,16 @@ }, { "name": "symfony/finder", - "version": "v8.1.5", + "version": "v8.1.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "8d7acede2b2ae07605783d1c43e49b5767036474" + "reference": "4fbe46a3eb64abf8a57f0364075b91f4a233e062" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8d7acede2b2ae07605783d1c43e49b5767036474", - "reference": "8d7acede2b2ae07605783d1c43e49b5767036474", + "url": "https://api.github.com/repos/symfony/finder/zipball/4fbe46a3eb64abf8a57f0364075b91f4a233e062", + "reference": "4fbe46a3eb64abf8a57f0364075b91f4a233e062", "shasum": "" }, "require": { @@ -10479,7 +9882,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v8.1.5" + "source": "https://github.com/symfony/finder/tree/v8.1.7" }, "funding": [ { @@ -10499,7 +9902,7 @@ "type": "tidelift" } ], - "time": "2026-08-21T12:16:08+00:00" + "time": "2026-09-10T19:14:39+00:00" }, { "name": "symfony/html-sanitizer", @@ -10673,16 +10076,16 @@ }, { "name": "symfony/http-client-contracts", - "version": "v3.7.1", + "version": "v3.7.3", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "41fc42d276aeff21192465331ebbab7d83a743c0" + "reference": "35be0019e2c2c9fba80f9dc033290a5240f7b44f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/41fc42d276aeff21192465331ebbab7d83a743c0", - "reference": "41fc42d276aeff21192465331ebbab7d83a743c0", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/35be0019e2c2c9fba80f9dc033290a5240f7b44f", + "reference": "35be0019e2c2c9fba80f9dc033290a5240f7b44f", "shasum": "" }, "require": { @@ -10731,7 +10134,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.7.1" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.7.3" }, "funding": [ { @@ -10751,20 +10154,20 @@ "type": "tidelift" } ], - "time": "2026-06-05T06:23:12+00:00" + "time": "2026-08-04T08:41:16+00:00" }, { "name": "symfony/http-foundation", - "version": "v8.1.5", + "version": "v8.1.7", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "ee16f97e95cfa011a742714d7c8c8f70fe7423f4" + "reference": "d8fdc670ed510a69e3a9eb4f5eac89f5ed627e17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ee16f97e95cfa011a742714d7c8c8f70fe7423f4", - "reference": "ee16f97e95cfa011a742714d7c8c8f70fe7423f4", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d8fdc670ed510a69e3a9eb4f5eac89f5ed627e17", + "reference": "d8fdc670ed510a69e3a9eb4f5eac89f5ed627e17", "shasum": "" }, "require": { @@ -10812,7 +10215,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v8.1.5" + "source": "https://github.com/symfony/http-foundation/tree/v8.1.7" }, "funding": [ { @@ -10832,20 +10235,20 @@ "type": "tidelift" } ], - "time": "2026-08-20T09:59:12+00:00" + "time": "2026-09-14T17:47:24+00:00" }, { "name": "symfony/http-kernel", - "version": "v8.1.5", + "version": "v8.1.7", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "0306e1e65b90023fe40de6c6be95d06396bcb2e6" + "reference": "ec7a3a5832c22cf880cf27d2fdc7ad2e94838e85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/0306e1e65b90023fe40de6c6be95d06396bcb2e6", - "reference": "0306e1e65b90023fe40de6c6be95d06396bcb2e6", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ec7a3a5832c22cf880cf27d2fdc7ad2e94838e85", + "reference": "ec7a3a5832c22cf880cf27d2fdc7ad2e94838e85", "shasum": "" }, "require": { @@ -10922,7 +10325,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v8.1.5" + "source": "https://github.com/symfony/http-kernel/tree/v8.1.7" }, "funding": [ { @@ -10942,20 +10345,20 @@ "type": "tidelift" } ], - "time": "2026-08-22T13:45:00+00:00" + "time": "2026-09-15T07:12:52+00:00" }, { "name": "symfony/mailer", - "version": "v7.4.17", + "version": "v7.4.19", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "b17c9bf3a551d5f635638a3b6c05f06c4dc87584" + "reference": "6f6f2441bef07a42d2617b9b3aadf04a321aa514" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/b17c9bf3a551d5f635638a3b6c05f06c4dc87584", - "reference": "b17c9bf3a551d5f635638a3b6c05f06c4dc87584", + "url": "https://api.github.com/repos/symfony/mailer/zipball/6f6f2441bef07a42d2617b9b3aadf04a321aa514", + "reference": "6f6f2441bef07a42d2617b9b3aadf04a321aa514", "shasum": "" }, "require": { @@ -11006,7 +10409,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.4.17" + "source": "https://github.com/symfony/mailer/tree/v7.4.19" }, "funding": [ { @@ -11026,7 +10429,7 @@ "type": "tidelift" } ], - "time": "2026-08-21T17:40:08+00:00" + "time": "2026-09-15T06:01:15+00:00" }, { "name": "symfony/mailgun-mailer", @@ -11103,16 +10506,16 @@ }, { "name": "symfony/mime", - "version": "v8.1.5", + "version": "v8.1.7", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "1b36ccfd7ccb9ad1d6eafb9024b3dd3d9606b15f" + "reference": "773ac57f20e2795bdadb65b5b1b5f4850d498283" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/1b36ccfd7ccb9ad1d6eafb9024b3dd3d9606b15f", - "reference": "1b36ccfd7ccb9ad1d6eafb9024b3dd3d9606b15f", + "url": "https://api.github.com/repos/symfony/mime/zipball/773ac57f20e2795bdadb65b5b1b5f4850d498283", + "reference": "773ac57f20e2795bdadb65b5b1b5f4850d498283", "shasum": "" }, "require": { @@ -11165,7 +10568,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v8.1.5" + "source": "https://github.com/symfony/mime/tree/v8.1.7" }, "funding": [ { @@ -11185,7 +10588,7 @@ "type": "tidelift" } ], - "time": "2026-08-22T09:06:25+00:00" + "time": "2026-09-04T11:02:17+00:00" }, { "name": "symfony/options-resolver", @@ -11764,86 +11167,6 @@ ], "time": "2026-04-10T16:19:22+00:00" }, - { - "name": "symfony/polyfill-php82", - "version": "v1.38.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php82.git", - "reference": "002dc0cfe5fd4ed6033d48f27d4f19a486c4b04b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php82/zipball/002dc0cfe5fd4ed6033d48f27d4f19a486c4b04b", - "reference": "002dc0cfe5fd4ed6033d48f27d4f19a486c4b04b", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php82\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php82/tree/v1.38.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2026-05-26T12:45:58+00:00" - }, { "name": "symfony/polyfill-php83", "version": "v1.41.0", @@ -12249,16 +11572,16 @@ }, { "name": "symfony/process", - "version": "v8.1.5", + "version": "v8.1.7", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "d863f5e70d7c87abb906ac11b61f83036093000b" + "reference": "10823b09358e690df4ff943e24e8492bb1019fc3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/d863f5e70d7c87abb906ac11b61f83036093000b", - "reference": "d863f5e70d7c87abb906ac11b61f83036093000b", + "url": "https://api.github.com/repos/symfony/process/zipball/10823b09358e690df4ff943e24e8492bb1019fc3", + "reference": "10823b09358e690df4ff943e24e8492bb1019fc3", "shasum": "" }, "require": { @@ -12290,7 +11613,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v8.1.5" + "source": "https://github.com/symfony/process/tree/v8.1.7" }, "funding": [ { @@ -12310,7 +11633,7 @@ "type": "tidelift" } ], - "time": "2026-08-21T17:47:34+00:00" + "time": "2026-09-02T12:40:29+00:00" }, { "name": "symfony/property-access", @@ -12481,7 +11804,7 @@ }, { "name": "symfony/routing", - "version": "v8.1.5", + "version": "v8.1.6", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", @@ -12537,7 +11860,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v8.1.5" + "source": "https://github.com/symfony/routing/tree/v8.1.6" }, "funding": [ { @@ -12660,16 +11983,16 @@ }, { "name": "symfony/service-contracts", - "version": "v3.7.1", + "version": "v3.7.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0" + "reference": "15e6a07ec2a2c75ceb1b21dd98105ee8456d2257" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/c0a284bab1ed8aa0417e3d69250ab437739563a0", - "reference": "c0a284bab1ed8aa0417e3d69250ab437739563a0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/15e6a07ec2a2c75ceb1b21dd98105ee8456d2257", + "reference": "15e6a07ec2a2c75ceb1b21dd98105ee8456d2257", "shasum": "" }, "require": { @@ -12723,7 +12046,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.7.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.7.3" }, "funding": [ { @@ -12743,20 +12066,20 @@ "type": "tidelift" } ], - "time": "2026-06-16T09:55:08+00:00" + "time": "2026-07-27T15:39:01+00:00" }, { "name": "symfony/string", - "version": "v8.1.2", + "version": "v8.1.7", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "286a76b7255e5cc4bf0101a0bc5388ecf1c38ccc" + "reference": "d950140b5f56f31901e5b7a0c04ffc3a3deb943c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/286a76b7255e5cc4bf0101a0bc5388ecf1c38ccc", - "reference": "286a76b7255e5cc4bf0101a0bc5388ecf1c38ccc", + "url": "https://api.github.com/repos/symfony/string/zipball/d950140b5f56f31901e5b7a0c04ffc3a3deb943c", + "reference": "d950140b5f56f31901e5b7a0c04ffc3a3deb943c", "shasum": "" }, "require": { @@ -12813,7 +12136,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.1.2" + "source": "https://github.com/symfony/string/tree/v8.1.7" }, "funding": [ { @@ -12833,7 +12156,7 @@ "type": "tidelift" } ], - "time": "2026-07-28T07:35:25+00:00" + "time": "2026-09-11T14:51:16+00:00" }, { "name": "symfony/translation", @@ -13172,16 +12495,16 @@ }, { "name": "symfony/var-dumper", - "version": "v8.1.5", + "version": "v8.1.7", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "61743d9bc7ab23b194527ca1be2fafd7dc93b74a" + "reference": "741a8c4c948b0bb9bd3653daacd3644c73c40ea5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/61743d9bc7ab23b194527ca1be2fafd7dc93b74a", - "reference": "61743d9bc7ab23b194527ca1be2fafd7dc93b74a", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/741a8c4c948b0bb9bd3653daacd3644c73c40ea5", + "reference": "741a8c4c948b0bb9bd3653daacd3644c73c40ea5", "shasum": "" }, "require": { @@ -13235,7 +12558,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v8.1.5" + "source": "https://github.com/symfony/var-dumper/tree/v8.1.7" }, "funding": [ { @@ -13255,7 +12578,7 @@ "type": "tidelift" } ], - "time": "2026-08-21T12:16:08+00:00" + "time": "2026-09-03T16:02:27+00:00" }, { "name": "tapp/filament-auditing", @@ -14250,16 +13573,16 @@ "packages-dev": [ { "name": "brianium/paratest", - "version": "v7.20.0", + "version": "v7.24.1", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "81c80677c9ec0ed4ef16b246167f11dec81a6e3d" + "reference": "c29bc43a5cdd0124b7eff959064ae83ea902b49a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/81c80677c9ec0ed4ef16b246167f11dec81a6e3d", - "reference": "81c80677c9ec0ed4ef16b246167f11dec81a6e3d", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/c29bc43a5cdd0124b7eff959064ae83ea902b49a", + "reference": "c29bc43a5cdd0124b7eff959064ae83ea902b49a", "shasum": "" }, "require": { @@ -14269,25 +13592,25 @@ "ext-simplexml": "*", "fidry/cpu-core-counter": "^1.3.0", "jean85/pretty-package-versions": "^2.1.1", - "php": "~8.3.0 || ~8.4.0 || ~8.5.0", - "phpunit/php-code-coverage": "^12.5.3 || ^13.0.1", - "phpunit/php-file-iterator": "^6.0.1 || ^7", - "phpunit/php-timer": "^8 || ^9", - "phpunit/phpunit": "^12.5.14 || ^13.0.5", - "sebastian/environment": "^8.0.3 || ^9", - "symfony/console": "^7.4.7 || ^8.0.7", - "symfony/process": "^7.4.5 || ^8.0.5" + "php": "~8.4.0 || ~8.5.0", + "phpunit/php-code-coverage": "^14.3.1", + "phpunit/php-file-iterator": "^7", + "phpunit/php-timer": "^9", + "phpunit/phpunit": "^13.3.1", + "sebastian/environment": "^9.3.2", + "symfony/console": "^7.4.8 || ^8.1.2", + "symfony/process": "^7.4.8 || ^8.1.0" }, "require-dev": { "doctrine/coding-standard": "^14.0.0", "ext-pcntl": "*", "ext-pcov": "*", "ext-posix": "*", - "phpstan/phpstan": "^2.1.44", - "phpstan/phpstan-deprecation-rules": "^2.0.4", - "phpstan/phpstan-phpunit": "^2.0.16", - "phpstan/phpstan-strict-rules": "^2.0.10", - "symfony/filesystem": "^7.4.6 || ^8.0.6" + "phpstan/phpstan": "^2.2.8", + "phpstan/phpstan-deprecation-rules": "^2.0.5", + "phpstan/phpstan-phpunit": "^2.0.18", + "phpstan/phpstan-strict-rules": "^2.0.12", + "symfony/filesystem": "^7.4.8 || ^8.1.2" }, "bin": [ "bin/paratest", @@ -14327,7 +13650,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v7.20.0" + "source": "https://github.com/paratestphp/paratest/tree/v7.24.1" }, "funding": [ { @@ -14339,149 +13662,7 @@ "type": "paypal" } ], - "time": "2026-03-29T15:46:14+00:00" - }, - { - "name": "composer/pcre", - "version": "3.4.0", - "source": { - "type": "git", - "url": "https://github.com/composer/pcre.git", - "reference": "d5a341b3fb61f3001970940afb1d332968a183ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/d5a341b3fb61f3001970940afb1d332968a183ed", - "reference": "d5a341b3fb61f3001970940afb1d332968a183ed", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0" - }, - "conflict": { - "phpstan/phpstan": "<2.2.2" - }, - "require-dev": { - "phpstan/phpstan": "^2", - "phpstan/phpstan-deprecation-rules": "^2", - "phpstan/phpstan-strict-rules": "^2", - "phpunit/phpunit": "^9" - }, - "type": "library", - "extra": { - "phpstan": { - "includes": [ - "extension.neon" - ] - }, - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Pcre\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "PCRE wrapping library that offers type-safe preg_* replacements.", - "keywords": [ - "PCRE", - "preg", - "regex", - "regular expression" - ], - "support": { - "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.4.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - } - ], - "time": "2026-06-07T11:47:49+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "3.0.5", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", - "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", - "shasum": "" - }, - "require": { - "composer/pcre": "^1 || ^2 || ^3", - "php": "^7.2.5 || ^8.0", - "psr/log": "^1 || ^2 || ^3" - }, - "require-dev": { - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-strict-rules": "^1.1", - "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "ircs://irc.libera.chat:6697/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2024-05-06T16:37:16+00:00" + "time": "2026-08-17T06:31:26+00:00" }, { "name": "driftingly/rector-laravel", @@ -14604,16 +13785,16 @@ }, { "name": "filp/whoops", - "version": "2.18.4", + "version": "2.18.5", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "d2102955e48b9fd9ab24280a7ad12ed552752c4d" + "reference": "baec851ad6ae00db8bd0fdd30d208afc1b71c56e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/d2102955e48b9fd9ab24280a7ad12ed552752c4d", - "reference": "d2102955e48b9fd9ab24280a7ad12ed552752c4d", + "url": "https://api.github.com/repos/filp/whoops/zipball/baec851ad6ae00db8bd0fdd30d208afc1b71c56e", + "reference": "baec851ad6ae00db8bd0fdd30d208afc1b71c56e", "shasum": "" }, "require": { @@ -14622,8 +13803,8 @@ }, "require-dev": { "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^4.0 || ^5.0" + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3 || ^10.5.58", + "symfony/var-dumper": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0" }, "suggest": { "symfony/var-dumper": "Pretty print complex values better with var-dumper available", @@ -14663,7 +13844,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.18.4" + "source": "https://github.com/filp/whoops/tree/2.18.5" }, "funding": [ { @@ -14671,7 +13852,7 @@ "type": "github" } ], - "time": "2025-08-08T12:00:00+00:00" + "time": "2026-09-18T12:00:00+00:00" }, { "name": "fruitcake/laravel-debugbar", @@ -15106,75 +14287,6 @@ }, "time": "2026-08-19T19:37:52+00:00" }, - { - "name": "mrpunyapal/rector-pest", - "version": "0.2.17", - "source": { - "type": "git", - "url": "https://github.com/MrPunyapal/rector-pest.git", - "reference": "967b5fe54c524f24a616e6e65327cb4f30bf9486" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MrPunyapal/rector-pest/zipball/967b5fe54c524f24a616e6e65327cb4f30bf9486", - "reference": "967b5fe54c524f24a616e6e65327cb4f30bf9486", - "shasum": "" - }, - "require": { - "php": "^8.2", - "rector/rector": "^2.0", - "symplify/rule-doc-generator-contracts": "^11.2" - }, - "require-dev": { - "laravel/pao": "^1.0", - "laravel/pint": "^1.18", - "mrpunyapal/peststan": "^0.2.5", - "pestphp/pest": "^3.0 || ^4.0", - "phpstan/phpstan": "^2.1", - "symplify/rule-doc-generator": "^12.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "RectorPest\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Punyapal Shah", - "email": "mrpunyapal@gmail.com" - } - ], - "description": "Rector upgrade rules for Pest - refactoring and best practices for Pest testing framework", - "keywords": [ - "ast", - "dev", - "instant-upgrades", - "pest", - "pestphp", - "phpunit", - "rector", - "refactoring", - "static-analysis", - "testing" - ], - "support": { - "issues": "https://github.com/MrPunyapal/rector-pest/issues", - "source": "https://github.com/MrPunyapal/rector-pest/tree/0.2.17" - }, - "funding": [ - { - "url": "https://github.com/mrpunyapal", - "type": "github" - } - ], - "abandoned": "https://github.com/pestphp/pest-plugin-rector", - "time": "2026-07-03T10:14:25+00:00" - }, { "name": "myclabs/deep-copy", "version": "1.14.0", @@ -15333,42 +14445,43 @@ }, { "name": "pestphp/pest", - "version": "v4.7.8", + "version": "v5.2.1", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "5b2293f67adcf1b2320b33f521b94a692d18f360" + "reference": "94f4f1ff4835dae2519f8b13f349d1042318e076" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/5b2293f67adcf1b2320b33f521b94a692d18f360", - "reference": "5b2293f67adcf1b2320b33f521b94a692d18f360", + "url": "https://api.github.com/repos/pestphp/pest/zipball/94f4f1ff4835dae2519f8b13f349d1042318e076", + "reference": "94f4f1ff4835dae2519f8b13f349d1042318e076", "shasum": "" }, "require": { - "brianium/paratest": "^7.20.0", - "composer/xdebug-handler": "^3.0.5", + "brianium/paratest": "^7.24.1", "nunomaduro/collision": "^8.9.5", "nunomaduro/termwind": "^2.4.0", - "pestphp/pest-plugin": "^4.0.0", - "pestphp/pest-plugin-arch": "^4.0.2", - "pestphp/pest-plugin-mutate": "^4.0.1", - "pestphp/pest-plugin-profanity": "^4.2.1", - "php": "^8.3.0", - "phpunit/phpunit": "^12.5.33", - "symfony/process": "^7.4.13|^8.1.0" + "pestphp/pest-plugin": "^5.0.0", + "pestphp/pest-plugin-arch": "^5.0.0", + "pestphp/pest-plugin-mutate": "^5.0.2", + "pestphp/pest-plugin-profanity": "^5.0.0", + "php": "^8.4", + "phpunit/phpunit": "^13.3.4", + "symfony/process": "^8.1.7" }, "conflict": { "filp/whoops": "<2.18.3", - "phpunit/phpunit": ">12.5.33", + "laravel/boost": "<2.6.0", + "phpunit/phpunit": ">13.3.4", "sebastian/exporter": "<7.0.0", "webmozart/assert": "<1.11.0" }, "require-dev": { - "mrpunyapal/peststan": "^0.2.12", - "pestphp/pest-dev-tools": "^4.1.0", - "pestphp/pest-plugin-browser": "^4.3.1", - "pestphp/pest-plugin-type-coverage": "^4.0.4", + "pestphp/pest-dev-tools": "^5.0.0", + "pestphp/pest-plugin-browser": "^5.0.1", + "pestphp/pest-plugin-phpstan": "^5.2.1", + "pestphp/pest-plugin-rector": "^5.0.4", + "pestphp/pest-plugin-type-coverage": "^5.0.2", "psy/psysh": "^0.12.24" }, "bin": [ @@ -15396,6 +14509,7 @@ "Pest\\Plugins\\Verbose", "Pest\\Plugins\\Version", "Pest\\Plugins\\Shard", + "Pest\\Plugins\\Tia", "Pest\\Plugins\\Parallel" ] }, @@ -15435,7 +14549,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v4.7.8" + "source": "https://github.com/pestphp/pest/tree/v5.2.1" }, "funding": [ { @@ -15447,34 +14561,34 @@ "type": "github" } ], - "time": "2026-08-03T20:49:44+00:00" + "time": "2026-09-17T11:41:10+00:00" }, { "name": "pestphp/pest-plugin", - "version": "v4.0.0", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin.git", - "reference": "9d4b93d7f73d3f9c3189bb22c220fef271cdf568" + "reference": "87283f41aafa2561b7618be53eab00f2d06f4140" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin/zipball/9d4b93d7f73d3f9c3189bb22c220fef271cdf568", - "reference": "9d4b93d7f73d3f9c3189bb22c220fef271cdf568", + "url": "https://api.github.com/repos/pestphp/pest-plugin/zipball/87283f41aafa2561b7618be53eab00f2d06f4140", + "reference": "87283f41aafa2561b7618be53eab00f2d06f4140", "shasum": "" }, "require": { "composer-plugin-api": "^2.0.0", "composer-runtime-api": "^2.2.2", - "php": "^8.3" + "php": "^8.4" }, "conflict": { - "pestphp/pest": "<4.0.0" + "pestphp/pest": "<5.0.0" }, "require-dev": { - "composer/composer": "^2.8.10", - "pestphp/pest": "^4.0.0", - "pestphp/pest-dev-tools": "^4.0.0" + "composer/composer": "^2.10.2", + "pestphp/pest": "^5.0.0", + "pestphp/pest-dev-tools": "^5.0.0" }, "type": "composer-plugin", "extra": { @@ -15501,7 +14615,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin/tree/v4.0.0" + "source": "https://github.com/pestphp/pest-plugin/tree/v5.0.0" }, "funding": [ { @@ -15517,30 +14631,33 @@ "type": "patreon" } ], - "time": "2025-08-20T12:35:58+00:00" + "time": "2026-07-18T17:10:45+00:00" }, { "name": "pestphp/pest-plugin-arch", - "version": "v4.0.2", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-arch.git", - "reference": "3fb0d02a91b9da504b139dc7ab2a31efb7c3215c" + "reference": "244465d5dc9ea9fb5ac5c9badb7eb47d1594e4c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/3fb0d02a91b9da504b139dc7ab2a31efb7c3215c", - "reference": "3fb0d02a91b9da504b139dc7ab2a31efb7c3215c", + "url": "https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/244465d5dc9ea9fb5ac5c9badb7eb47d1594e4c1", + "reference": "244465d5dc9ea9fb5ac5c9badb7eb47d1594e4c1", "shasum": "" }, "require": { - "pestphp/pest-plugin": "^4.0.0", - "php": "^8.3", + "pestphp/pest-plugin": "^5.0.0", + "php": "^8.4", "ta-tikoma/phpunit-architecture-test": "^0.8.7" }, + "conflict": { + "pestphp/pest": "<5.0.0" + }, "require-dev": { - "pestphp/pest": "^4.4.6", - "pestphp/pest-dev-tools": "^4.1.0" + "pestphp/pest": "^5.0.0", + "pestphp/pest-dev-tools": "^5.0.0" }, "type": "library", "extra": { @@ -15575,7 +14692,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin-arch/tree/v4.0.2" + "source": "https://github.com/pestphp/pest-plugin-arch/tree/v5.0.0" }, "funding": [ { @@ -15587,31 +14704,34 @@ "type": "github" } ], - "time": "2026-04-10T17:20:19+00:00" + "time": "2026-07-21T07:48:55+00:00" }, { "name": "pestphp/pest-plugin-laravel", - "version": "v4.1.0", + "version": "v5.0.1", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-laravel.git", - "reference": "3057a36669ff11416cc0dc2b521b3aec58c488d0" + "reference": "d1564646e3198f1b607e64a36501d6edff7d104e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-laravel/zipball/3057a36669ff11416cc0dc2b521b3aec58c488d0", - "reference": "3057a36669ff11416cc0dc2b521b3aec58c488d0", + "url": "https://api.github.com/repos/pestphp/pest-plugin-laravel/zipball/d1564646e3198f1b607e64a36501d6edff7d104e", + "reference": "d1564646e3198f1b607e64a36501d6edff7d104e", "shasum": "" }, "require": { - "laravel/framework": "^11.45.2|^12.52.0|^13.0", - "pestphp/pest": "^4.4.1", - "php": "^8.3.0" + "laravel/framework": "^13.23.0", + "pestphp/pest": "^5.0.1", + "php": "^8.4" + }, + "conflict": { + "pestphp/pest": "<5.0.0" }, "require-dev": { - "laravel/dusk": "^8.3.6", - "orchestra/testbench": "^9.13.0|^10.9.0|^11.0", - "pestphp/pest-dev-tools": "^4.1.0" + "laravel/dusk": "^8.6.0", + "orchestra/testbench": "^11.1", + "pestphp/pest-dev-tools": "^5.0.0" }, "type": "library", "extra": { @@ -15649,7 +14769,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin-laravel/tree/v4.1.0" + "source": "https://github.com/pestphp/pest-plugin-laravel/tree/v5.0.1" }, "funding": [ { @@ -15661,32 +14781,36 @@ "type": "github" } ], - "time": "2026-02-21T00:29:45+00:00" + "time": "2026-07-29T18:19:36+00:00" }, { "name": "pestphp/pest-plugin-mutate", - "version": "v4.0.1", + "version": "v5.0.2", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-mutate.git", - "reference": "d9b32b60b2385e1688a68cc227594738ec26d96c" + "reference": "d0c87110416b699413cc073b8dcc92e440d81931" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-mutate/zipball/d9b32b60b2385e1688a68cc227594738ec26d96c", - "reference": "d9b32b60b2385e1688a68cc227594738ec26d96c", + "url": "https://api.github.com/repos/pestphp/pest-plugin-mutate/zipball/d0c87110416b699413cc073b8dcc92e440d81931", + "reference": "d0c87110416b699413cc073b8dcc92e440d81931", "shasum": "" }, "require": { - "nikic/php-parser": "^5.6.1", - "pestphp/pest-plugin": "^4.0.0", - "php": "^8.3", + "nikic/php-parser": "^5.8.0", + "pestphp/pest-plugin": "^5.0.0", + "php": "^8.4", + "phpunit/php-code-coverage": "^14.3.0", "psr/simple-cache": "^3.0.0" }, + "conflict": { + "pestphp/pest": "<5.0.0" + }, "require-dev": { - "pestphp/pest": "^4.0.0", - "pestphp/pest-dev-tools": "^4.0.0", - "pestphp/pest-plugin-type-coverage": "^4.0.0" + "pestphp/pest": "^5.0.4", + "pestphp/pest-dev-tools": "^5.0.0", + "pestphp/pest-plugin-type-coverage": "^5.0.2" }, "type": "library", "autoload": { @@ -15721,7 +14845,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin-mutate/tree/v4.0.1" + "source": "https://github.com/pestphp/pest-plugin-mutate/tree/v5.0.2" }, "funding": [ { @@ -15737,30 +14861,33 @@ "type": "github" } ], - "time": "2025-08-21T20:19:25+00:00" + "time": "2026-08-10T11:01:27+00:00" }, { "name": "pestphp/pest-plugin-profanity", - "version": "v4.2.1", + "version": "v5.0.0", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-profanity.git", - "reference": "343cfa6f3564b7e35df0ebb77b7fa97039f72b27" + "reference": "3dedf9ea6e2876b5b31f7733d3eacbd86f4653b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-profanity/zipball/343cfa6f3564b7e35df0ebb77b7fa97039f72b27", - "reference": "343cfa6f3564b7e35df0ebb77b7fa97039f72b27", + "url": "https://api.github.com/repos/pestphp/pest-plugin-profanity/zipball/3dedf9ea6e2876b5b31f7733d3eacbd86f4653b9", + "reference": "3dedf9ea6e2876b5b31f7733d3eacbd86f4653b9", "shasum": "" }, "require": { - "pestphp/pest-plugin": "^4.0.0", - "php": "^8.3" + "pestphp/pest-plugin": "^5.0.0", + "php": "^8.4" + }, + "conflict": { + "pestphp/pest": "<5.0.0" }, "require-dev": { - "faissaloux/pest-plugin-inside": "^1.9", - "pestphp/pest": "^4.0.0", - "pestphp/pest-dev-tools": "^4.0.0" + "faissaloux/pest-plugin-inside": "^1.11", + "pestphp/pest": "^5.0.0", + "pestphp/pest-dev-tools": "^5.0.0" }, "type": "library", "extra": { @@ -15791,9 +14918,93 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin-profanity/tree/v4.2.1" + "source": "https://github.com/pestphp/pest-plugin-profanity/tree/v5.0.0" }, - "time": "2025-12-08T00:13:17+00:00" + "time": "2026-07-21T07:48:56+00:00" + }, + { + "name": "pestphp/pest-plugin-rector", + "version": "v5.0.4", + "source": { + "type": "git", + "url": "https://github.com/pestphp/pest-plugin-rector.git", + "reference": "d881f0ab8d4392f4a127c2f0aa8230529f856fc5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pestphp/pest-plugin-rector/zipball/d881f0ab8d4392f4a127c2f0aa8230529f856fc5", + "reference": "d881f0ab8d4392f4a127c2f0aa8230529f856fc5", + "shasum": "" + }, + "require": { + "php": "^8.4", + "rector/rector": "^2.6.1", + "symplify/rule-doc-generator-contracts": "^11.2" + }, + "conflict": { + "pestphp/pest": "<5.0.0" + }, + "require-dev": { + "laravel/pao": "^1.1.3", + "laravel/pint": "^1.30.3", + "pestphp/pest": "^5.0.3", + "pestphp/pest-plugin-phpstan": "^5.0", + "phpstan/phpstan": "^2.2.7", + "symplify/rule-doc-generator": "^12.2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Pest\\Rector\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Punyapal Shah", + "email": "mrpunyapal@gmail.com" + }, + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Rector plugin for Pest", + "keywords": [ + "framework", + "pest", + "php", + "plugin", + "rector", + "test", + "testing", + "unit" + ], + "support": { + "source": "https://github.com/pestphp/pest-plugin-rector/tree/v5.0.4" + }, + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/mrpunyapal", + "type": "github" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2026-08-21T10:26:03+00:00" }, { "name": "phar-io/manifest", @@ -16083,33 +15294,35 @@ }, { "name": "phpunit/php-code-coverage", - "version": "12.5.7", + "version": "14.3.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "186dab580576598076de6818596d12b61801880e" + "reference": "f8640c238e930b914d0098a1edbad6652e61a64a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/186dab580576598076de6818596d12b61801880e", - "reference": "186dab580576598076de6818596d12b61801880e", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f8640c238e930b914d0098a1edbad6652e61a64a", + "reference": "f8640c238e930b914d0098a1edbad6652e61a64a", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", + "ext-mbstring": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^5.7.0", - "php": ">=8.3", - "phpunit/php-text-template": "^5.0", - "sebastian/complexity": "^5.0", - "sebastian/environment": "^8.1.2", - "sebastian/lines-of-code": "^4.0.1", - "sebastian/version": "^6.0", + "nikic/php-parser": "^5.8.0", + "php": ">=8.4", + "phpunit/php-text-template": "^6.0", + "sebastian/complexity": "^6.0", + "sebastian/environment": "^9.3.2", + "sebastian/git-state": "^1.0", + "sebastian/lines-of-code": "^5.0.2", + "sebastian/version": "^7.0", "theseer/tokenizer": "^2.0.1" }, "require-dev": { - "phpunit/phpunit": "^12.5.28" + "phpunit/phpunit": "^13.3.3" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -16118,7 +15331,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "12.5.x-dev" + "dev-main": "14.3.x-dev" } }, "autoload": { @@ -16147,7 +15360,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.5.7" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/14.3.3" }, "funding": [ { @@ -16167,32 +15380,32 @@ "type": "tidelift" } ], - "time": "2026-06-01T13:24:19+00:00" + "time": "2026-09-10T13:08:32+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "6.0.2", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "a248d1640ab059b075f53a2ef0f9856e864e06b5" + "reference": "9bb4e6c58b62c1e043be995c66abec7c97307aae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a248d1640ab059b075f53a2ef0f9856e864e06b5", - "reference": "a248d1640ab059b075f53a2ef0f9856e864e06b5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/9bb4e6c58b62c1e043be995c66abec7c97307aae", + "reference": "9bb4e6c58b62c1e043be995c66abec7c97307aae", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.5.33" + "phpunit/phpunit": "^13.3.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -16220,7 +15433,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.2" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/7.0.2" }, "funding": [ { @@ -16240,28 +15453,28 @@ "type": "tidelift" } ], - "time": "2026-08-25T14:40:53+00:00" + "time": "2026-08-25T14:47:43+00:00" }, { "name": "phpunit/php-invoker", - "version": "6.0.0", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406" + "reference": "42e5c5cae0c65df12d1b1a3ab52bf3f50f244d88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/12b54e689b07a25a9b41e57736dfab6ec9ae5406", - "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/42e5c5cae0c65df12d1b1a3ab52bf3f50f244d88", + "reference": "42e5c5cae0c65df12d1b1a3ab52bf3f50f244d88", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^13.0" }, "suggest": { "ext-pcntl": "*" @@ -16269,7 +15482,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -16296,40 +15509,52 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/6.0.0" + "source": "https://github.com/sebastianbergmann/php-invoker/tree/7.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-invoker", + "type": "tidelift" } ], - "time": "2025-02-07T04:58:58+00:00" + "time": "2026-02-06T04:34:47+00:00" }, { "name": "phpunit/php-text-template", - "version": "5.0.0", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53" + "reference": "a47af19f93f76aa3368303d752aa5272ca3299f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/e1367a453f0eda562eedb4f659e13aa900d66c53", - "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/a47af19f93f76aa3368303d752aa5272ca3299f4", + "reference": "a47af19f93f76aa3368303d752aa5272ca3299f4", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -16356,40 +15581,52 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/6.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-text-template", + "type": "tidelift" } ], - "time": "2025-02-07T04:59:16+00:00" + "time": "2026-02-06T04:36:37+00:00" }, { "name": "phpunit/php-timer", - "version": "8.0.0", + "version": "9.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc" + "reference": "a0e12065831f6ab0d83120dc61513eb8d9a966f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", - "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/a0e12065831f6ab0d83120dc61513eb8d9a966f6", + "reference": "a0e12065831f6ab0d83120dc61513eb8d9a966f6", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "9.0-dev" } }, "autoload": { @@ -16416,28 +15653,40 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", "security": "https://github.com/sebastianbergmann/php-timer/security/policy", - "source": "https://github.com/sebastianbergmann/php-timer/tree/8.0.0" + "source": "https://github.com/sebastianbergmann/php-timer/tree/9.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-timer", + "type": "tidelift" } ], - "time": "2025-02-07T04:59:38+00:00" + "time": "2026-02-06T04:37:53+00:00" }, { "name": "phpunit/phpunit", - "version": "12.5.33", + "version": "13.3.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b98e028a26c5c5ba7e4a54be96ccf35f2914d184" + "reference": "d19d90cf860efb7e4d96cee8243e06a248578085" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b98e028a26c5c5ba7e4a54be96ccf35f2914d184", - "reference": "b98e028a26c5c5ba7e4a54be96ccf35f2914d184", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d19d90cf860efb7e4d96cee8243e06a248578085", + "reference": "d19d90cf860efb7e4d96cee8243e06a248578085", "shasum": "" }, "require": { @@ -16447,25 +15696,27 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.13.4", + "myclabs/deep-copy": "^1.14.0", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=8.3", - "phpunit/php-code-coverage": "^12.5.7", - "phpunit/php-file-iterator": "^6.0.1", - "phpunit/php-invoker": "^6.0.0", - "phpunit/php-text-template": "^5.0.0", - "phpunit/php-timer": "^8.0.0", - "sebastian/cli-parser": "^4.2.1", - "sebastian/comparator": "^7.1.8", - "sebastian/diff": "^7.0.0", - "sebastian/environment": "^8.1.2", - "sebastian/exporter": "^7.0.3", - "sebastian/global-state": "^8.0.3", - "sebastian/object-enumerator": "^7.0.0", - "sebastian/recursion-context": "^7.0.1", - "sebastian/type": "^6.0.4", - "sebastian/version": "^6.0.0", + "php": ">=8.4.1", + "phpunit/php-code-coverage": "^14.3.3", + "phpunit/php-file-iterator": "^7.0.2", + "phpunit/php-invoker": "^7.0.0", + "phpunit/php-text-template": "^6.0.0", + "phpunit/php-timer": "^9.0.0", + "sebastian/cli-parser": "^5.0.1", + "sebastian/comparator": "^8.4", + "sebastian/diff": "^9.0.1", + "sebastian/environment": "^9.3.2", + "sebastian/exporter": "^8.2.1", + "sebastian/file-filter": "^1.0", + "sebastian/git-state": "^1.0", + "sebastian/global-state": "^9.0.1", + "sebastian/object-enumerator": "^8.1.0", + "sebastian/recursion-context": "^8.0.1", + "sebastian/type": "^7.0.2", + "sebastian/version": "^7.0.0", "staabm/side-effects-detector": "^1.0.5" }, "bin": [ @@ -16474,7 +15725,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "12.5-dev" + "dev-main": "13.3-dev" } }, "autoload": { @@ -16506,7 +15757,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.33" + "source": "https://github.com/sebastianbergmann/phpunit/tree/13.3.4" }, "funding": [ { @@ -16514,7 +15765,7 @@ "type": "other" } ], - "time": "2026-07-28T13:58:09+00:00" + "time": "2026-09-15T07:37:05+00:00" }, { "name": "predis/predis", @@ -16637,28 +15888,28 @@ }, { "name": "sebastian/cli-parser", - "version": "4.2.1", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "7d05781b13f7dec9043a629a21d086ed74582a15" + "reference": "eeb759ad3146b7096fb59c3195d39e071cd409e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7d05781b13f7dec9043a629a21d086ed74582a15", - "reference": "7d05781b13f7dec9043a629a21d086ed74582a15", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/eeb759ad3146b7096fb59c3195d39e071cd409e3", + "reference": "eeb759ad3146b7096fb59c3195d39e071cd409e3", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.5.25" + "phpunit/phpunit": "^13.2.6" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.2-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -16682,7 +15933,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.1" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/5.0.1" }, "funding": [ { @@ -16702,31 +15953,31 @@ "type": "tidelift" } ], - "time": "2026-05-17T05:29:34+00:00" + "time": "2026-08-01T04:27:14+00:00" }, { "name": "sebastian/comparator", - "version": "7.1.8", + "version": "8.4.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "7c65c1e79836812819705b473a90c12399542485" + "reference": "3b070e608146cba00fd6fd1f0ffba89e5a8897fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/7c65c1e79836812819705b473a90c12399542485", - "reference": "7c65c1e79836812819705b473a90c12399542485", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/3b070e608146cba00fd6fd1f0ffba89e5a8897fb", + "reference": "3b070e608146cba00fd6fd1f0ffba89e5a8897fb", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0.3" + "php": ">=8.4", + "sebastian/diff": "^9.0", + "sebastian/exporter": "^8.2" }, "require-dev": { - "phpunit/phpunit": "^12.5.25" + "phpunit/phpunit": "^13.3" }, "suggest": { "ext-bcmath": "For comparing BcMath\\Number objects" @@ -16734,7 +15985,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "7.1-dev" + "dev-main": "8.4-dev" } }, "autoload": { @@ -16774,7 +16025,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.8" + "source": "https://github.com/sebastianbergmann/comparator/tree/8.4.0" }, "funding": [ { @@ -16794,33 +16045,33 @@ "type": "tidelift" } ], - "time": "2026-05-21T04:45:25+00:00" + "time": "2026-08-07T07:23:13+00:00" }, { "name": "sebastian/complexity", - "version": "5.0.0", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb" + "reference": "c5651c795c98093480df79350cb050813fc7a2f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/bad4316aba5303d0221f43f8cee37eb58d384bbb", - "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/c5651c795c98093480df79350cb050813fc7a2f3", + "reference": "c5651c795c98093480df79350cb050813fc7a2f3", "shasum": "" }, "require": { "nikic/php-parser": "^5.0", - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -16844,41 +16095,53 @@ "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", "security": "https://github.com/sebastianbergmann/complexity/security/policy", - "source": "https://github.com/sebastianbergmann/complexity/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/complexity/tree/6.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/complexity", + "type": "tidelift" } ], - "time": "2025-02-07T04:55:25+00:00" + "time": "2026-02-06T04:41:32+00:00" }, { "name": "sebastian/diff", - "version": "7.0.1", + "version": "9.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6" + "reference": "a2df6626c1baf31d5a88674882a3072f151b5a26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6", - "reference": "cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/a2df6626c1baf31d5a88674882a3072f151b5a26", + "reference": "a2df6626c1baf31d5a88674882a3072f151b5a26", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.5.33", + "phpunit/phpunit": "^13.3.1", "symfony/process": "^7.4.17" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "9.0-dev" } }, "autoload": { @@ -16911,7 +16174,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/7.0.1" + "source": "https://github.com/sebastianbergmann/diff/tree/9.0.1" }, "funding": [ { @@ -16931,27 +16194,27 @@ "type": "tidelift" } ], - "time": "2026-08-25T15:35:54+00:00" + "time": "2026-08-25T15:38:55+00:00" }, { "name": "sebastian/environment", - "version": "8.1.2", + "version": "9.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "9d32c685773823b1983e256ae4ecd48a10d6e439" + "reference": "6c9e487c9eb706a8d258102a1c0b0a3e53e86c2e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/9d32c685773823b1983e256ae4ecd48a10d6e439", - "reference": "9d32c685773823b1983e256ae4ecd48a10d6e439", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6c9e487c9eb706a8d258102a1c0b0a3e53e86c2e", + "reference": "6c9e487c9eb706a8d258102a1c0b0a3e53e86c2e", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.5.26" + "phpunit/phpunit": "^13.1.11" }, "suggest": { "ext-posix": "*" @@ -16959,7 +16222,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "8.1-dev" + "dev-main": "9.3-dev" } }, "autoload": { @@ -16987,7 +16250,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/8.1.2" + "source": "https://github.com/sebastianbergmann/environment/tree/9.3.2" }, "funding": [ { @@ -17007,34 +16270,34 @@ "type": "tidelift" } ], - "time": "2026-05-25T13:40:20+00:00" + "time": "2026-05-25T13:41:38+00:00" }, { "name": "sebastian/exporter", - "version": "7.0.3", + "version": "8.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c5e21b5de653ce0a769fb36f5cdfcb5e7a32cf23" + "reference": "24a3b69bba4a12ab615fca9d34680c5598d9ab7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c5e21b5de653ce0a769fb36f5cdfcb5e7a32cf23", - "reference": "c5e21b5de653ce0a769fb36f5cdfcb5e7a32cf23", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/24a3b69bba4a12ab615fca9d34680c5598d9ab7a", + "reference": "24a3b69bba4a12ab615fca9d34680c5598d9ab7a", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=8.3", - "sebastian/recursion-context": "^7.0.1" + "php": ">=8.4", + "sebastian/recursion-context": "^8.0.1" }, "require-dev": { - "phpunit/phpunit": "^12.5.25" + "phpunit/phpunit": "^13.3" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "8.2-dev" } }, "autoload": { @@ -17077,7 +16340,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/8.2.1" }, "funding": [ { @@ -17097,35 +16360,173 @@ "type": "tidelift" } ], - "time": "2026-05-20T04:37:17+00:00" + "time": "2026-08-07T07:22:06+00:00" }, { - "name": "sebastian/global-state", - "version": "8.0.3", + "name": "sebastian/file-filter", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "b164d3274d6537ab462591c5755f76a8f5b1aae9" + "url": "https://github.com/sebastianbergmann/file-filter.git", + "reference": "33a26f394330f6faa7684bb9cc73afb7727aae93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b164d3274d6537ab462591c5755f76a8f5b1aae9", - "reference": "b164d3274d6537ab462591c5755f76a8f5b1aae9", + "url": "https://api.github.com/repos/sebastianbergmann/file-filter/zipball/33a26f394330f6faa7684bb9cc73afb7727aae93", + "reference": "33a26f394330f6faa7684bb9cc73afb7727aae93", "shasum": "" }, "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0.1" + "php": ">=8.4" }, "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^12.5.28" + "phpunit/phpunit": "^13.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for filtering files", + "homepage": "https://github.com/sebastianbergmann/file-filter", + "support": { + "issues": "https://github.com/sebastianbergmann/file-filter/issues", + "security": "https://github.com/sebastianbergmann/file-filter/security/policy", + "source": "https://github.com/sebastianbergmann/file-filter/tree/1.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/file-filter", + "type": "tidelift" + } + ], + "time": "2026-04-22T07:20:04+00:00" + }, + { + "name": "sebastian/git-state", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/git-state.git", + "reference": "792a952e0eba55b6960a48aeceb9f371aad1f76b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/git-state/zipball/792a952e0eba55b6960a48aeceb9f371aad1f76b", + "reference": "792a952e0eba55b6960a48aeceb9f371aad1f76b", + "shasum": "" + }, + "require": { + "php": ">=8.4" + }, + "require-dev": { + "phpunit/phpunit": "^13.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for describing the state of a Git checkout", + "homepage": "https://github.com/sebastianbergmann/git-state", + "support": { + "issues": "https://github.com/sebastianbergmann/git-state/issues", + "security": "https://github.com/sebastianbergmann/git-state/security/policy", + "source": "https://github.com/sebastianbergmann/git-state/tree/1.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/git-state", + "type": "tidelift" + } + ], + "time": "2026-03-21T12:54:28+00:00" + }, + { + "name": "sebastian/global-state", + "version": "9.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "ba68ba79da690cf7eddefd3ce5b78b20b9ba9945" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ba68ba79da690cf7eddefd3ce5b78b20b9ba9945", + "reference": "ba68ba79da690cf7eddefd3ce5b78b20b9ba9945", + "shasum": "" + }, + "require": { + "php": ">=8.4", + "sebastian/object-reflector": "^6.0", + "sebastian/recursion-context": "^8.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^13.1.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "9.0-dev" } }, "autoload": { @@ -17151,7 +16552,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/8.0.3" + "source": "https://github.com/sebastianbergmann/global-state/tree/9.0.1" }, "funding": [ { @@ -17171,33 +16572,33 @@ "type": "tidelift" } ], - "time": "2026-06-01T15:10:33+00:00" + "time": "2026-06-01T15:11:33+00:00" }, { "name": "sebastian/lines-of-code", - "version": "4.0.1", + "version": "5.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "d543b8ef219dcd8da262cbb958639a96bedba10e" + "reference": "d1b6f8fce682505dbd048977f1abedf1b8ad3ff8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d543b8ef219dcd8da262cbb958639a96bedba10e", - "reference": "d543b8ef219dcd8da262cbb958639a96bedba10e", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d1b6f8fce682505dbd048977f1abedf1b8ad3ff8", + "reference": "d1b6f8fce682505dbd048977f1abedf1b8ad3ff8", "shasum": "" }, "require": { - "nikic/php-parser": "^5.7.0", - "php": ">=8.3" + "nikic/php-parser": "^5.8.0", + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.5.25" + "phpunit/phpunit": "^13.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -17221,7 +16622,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/4.0.1" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/5.0.2" }, "funding": [ { @@ -17241,34 +16642,33 @@ "type": "tidelift" } ], - "time": "2026-05-19T16:22:07+00:00" + "time": "2026-07-09T08:42:34+00:00" }, { "name": "sebastian/object-enumerator", - "version": "7.0.0", + "version": "8.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894" + "reference": "511064ecde82bd747e2ba2fab3dda8d977b59576" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1effe8e9b8e068e9ae228e542d5d11b5d16db894", - "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/511064ecde82bd747e2ba2fab3dda8d977b59576", + "reference": "511064ecde82bd747e2ba2fab3dda8d977b59576", "shasum": "" }, "require": { - "php": ">=8.3", - "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" + "php": ">=8.4", + "sebastian/recursion-context": "^8.0.1" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^13.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "8.1-dev" } }, "autoload": { @@ -17291,40 +16691,52 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/7.0.0" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/8.1.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/object-enumerator", + "type": "tidelift" } ], - "time": "2025-02-07T04:57:48+00:00" + "time": "2026-08-13T07:05:05+00:00" }, { "name": "sebastian/object-reflector", - "version": "5.0.0", + "version": "6.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "4bfa827c969c98be1e527abd576533293c634f6a" + "reference": "f71bbcdc4f95456b4622810bec64eb06372e25b2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/4bfa827c969c98be1e527abd576533293c634f6a", - "reference": "4bfa827c969c98be1e527abd576533293c634f6a", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/f71bbcdc4f95456b4622810bec64eb06372e25b2", + "reference": "f71bbcdc4f95456b4622810bec64eb06372e25b2", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^13.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "5.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -17347,40 +16759,52 @@ "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/6.1.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/object-reflector", + "type": "tidelift" } ], - "time": "2025-02-07T04:58:17+00:00" + "time": "2026-08-13T06:34:36+00:00" }, { "name": "sebastian/recursion-context", - "version": "7.0.1", + "version": "8.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "0b01998a7d5b1f122911a66bebcb8d46f0c82d8c" + "reference": "32dba72f2b4642d6a93db22d6c0a9280ff2e3ca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/0b01998a7d5b1f122911a66bebcb8d46f0c82d8c", - "reference": "0b01998a7d5b1f122911a66bebcb8d46f0c82d8c", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/32dba72f2b4642d6a93db22d6c0a9280ff2e3ca0", + "reference": "32dba72f2b4642d6a93db22d6c0a9280ff2e3ca0", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^13.2.6" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "7.0-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -17411,7 +16835,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/7.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/8.0.1" }, "funding": [ { @@ -17431,32 +16855,32 @@ "type": "tidelift" } ], - "time": "2025-08-13T04:44:59+00:00" + "time": "2026-08-03T05:58:12+00:00" }, { "name": "sebastian/type", - "version": "6.0.4", + "version": "7.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "82ff822c2edc46724be9f7411d3163021f602773" + "reference": "bd1df467864cb95140414059a535b2d906173fcf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/82ff822c2edc46724be9f7411d3163021f602773", - "reference": "82ff822c2edc46724be9f7411d3163021f602773", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/bd1df467864cb95140414059a535b2d906173fcf", + "reference": "bd1df467864cb95140414059a535b2d906173fcf", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "require-dev": { - "phpunit/phpunit": "^12.5.25" + "phpunit/phpunit": "^13.3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -17480,7 +16904,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/6.0.4" + "source": "https://github.com/sebastianbergmann/type/tree/7.0.2" }, "funding": [ { @@ -17500,29 +16924,29 @@ "type": "tidelift" } ], - "time": "2026-05-20T06:45:45+00:00" + "time": "2026-08-10T08:00:57+00:00" }, { "name": "sebastian/version", - "version": "6.0.0", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c" + "reference": "ad37a5552c8e2b88572249fdc19b6da7792e021b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/3e6ccf7657d4f0a59200564b08cead899313b53c", - "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ad37a5552c8e2b88572249fdc19b6da7792e021b", + "reference": "ad37a5552c8e2b88572249fdc19b6da7792e021b", "shasum": "" }, "require": { - "php": ">=8.3" + "php": ">=8.4" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "6.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -17546,15 +16970,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/version/issues", "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/6.0.0" + "source": "https://github.com/sebastianbergmann/version/tree/7.0.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/version", + "type": "tidelift" } ], - "time": "2025-02-07T05:00:38+00:00" + "time": "2026-02-06T04:52:52+00:00" }, { "name": "staabm/side-effects-detector", diff --git a/config/app.php b/config/app.php index a816d930c..e5b7ccdf7 100644 --- a/config/app.php +++ b/config/app.php @@ -162,7 +162,6 @@ return [ 'REDIS_PASSWORD', 'MAL_CLIENT_SECRET', 'ANILIST_CLIENT_SECRET', - 'ELASTIC_PASS', 'IMAGE_ACCESS_KEY_ID', 'IMAGE_SECRET_ACCESS_KEY', 'VIDEO_ACCESS_KEY_ID', @@ -182,7 +181,6 @@ return [ 'REDIS_PASSWORD', 'MAL_CLIENT_SECRET', 'ANILIST_CLIENT_SECRET', - 'ELASTIC_PASS', 'IMAGE_ACCESS_KEY_ID', 'IMAGE_SECRET_ACCESS_KEY', 'VIDEO_ACCESS_KEY_ID', diff --git a/config/elastic.client.php b/config/elastic.client.php deleted file mode 100644 index 3e4831994..000000000 --- a/config/elastic.client.php +++ /dev/null @@ -1,14 +0,0 @@ - env('ELASTIC_CONNECTION', 'default'), - 'connections' => [ - 'default' => [ - 'hosts' => [ - env('ELASTIC_HOST', 'localhost'), - ], - ], - ], -]; diff --git a/config/elastic.migrations.php b/config/elastic.migrations.php deleted file mode 100644 index e4ff1b468..000000000 --- a/config/elastic.migrations.php +++ /dev/null @@ -1,17 +0,0 @@ - [ - 'default_path' => env('ELASTIC_MIGRATIONS_DEFAULT_PATH', base_path('elastic/migrations')), - ], - 'database' => [ - 'table' => env('ELASTIC_MIGRATIONS_TABLE', 'elastic_migrations'), - 'connection' => env('ELASTIC_MIGRATIONS_CONNECTION'), - ], - 'prefixes' => [ - 'index' => env('ELASTIC_MIGRATIONS_INDEX_PREFIX', env('SCOUT_PREFIX', '')), - 'alias' => env('ELASTIC_MIGRATIONS_ALIAS_PREFIX', env('SCOUT_PREFIX', '')), - ], -]; diff --git a/config/elastic.scout_driver.php b/config/elastic.scout_driver.php deleted file mode 100644 index 0dc18a901..000000000 --- a/config/elastic.scout_driver.php +++ /dev/null @@ -1,7 +0,0 @@ - env('ELASTIC_SCOUT_DRIVER_REFRESH_DOCUMENTS', false), -]; diff --git a/elastic/migrations/2020_12_21_225415_create_anime_index.php b/elastic/migrations/2020_12_21_225415_create_anime_index.php deleted file mode 100644 index 8595f33f2..000000000 --- a/elastic/migrations/2020_12_21_225415_create_anime_index.php +++ /dev/null @@ -1,69 +0,0 @@ -configureTextAnalyzers($settings); - - $mapping->long('anime_id'); - $mapping->date('created_at'); - $mapping->text('title', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->long('season'); - $mapping->long('format'); - $mapping->text('slug', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('synonyms', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('synopsis', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->date('updated_at'); - $mapping->long('year'); - }); - } - - /** - * Reverse the migration. - */ - public function down(): void - { - Index::dropIfExists('anime'); - } -} diff --git a/elastic/migrations/2020_12_22_033019_create_artist_index.php b/elastic/migrations/2020_12_22_033019_create_artist_index.php deleted file mode 100644 index 5d2fdfb24..000000000 --- a/elastic/migrations/2020_12_22_033019_create_artist_index.php +++ /dev/null @@ -1,82 +0,0 @@ -configureTextAnalyzers($settings); - - $mapping->long('artist_id'); - $mapping->date('created_at'); - $mapping->text('name', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('name_native', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('slug', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('information', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('as', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('synonyms', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->date('updated_at'); - }); - } - - /** - * Reverse the migration. - */ - public function down(): void - { - Index::dropIfExists('artists'); - } -} diff --git a/elastic/migrations/2020_12_22_034505_create_entry_index.php b/elastic/migrations/2020_12_22_034505_create_entry_index.php deleted file mode 100644 index b330f8fae..000000000 --- a/elastic/migrations/2020_12_22_034505_create_entry_index.php +++ /dev/null @@ -1,187 +0,0 @@ -configureTextAnalyzers($settings); - - $mapping->text('anime_slug'); - $mapping->date('created_at'); - $mapping->long('entry_id'); - $mapping->text('episodes', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('notes', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->boolean('nsfw'); - $mapping->boolean('spoiler'); - $mapping->text('synonym_slug'); - $mapping->nested('theme', [ - 'properties' => [ - 'anime' => [ - 'type' => 'nested', - 'properties' => [ - 'anime_id' => [ - 'type' => 'long', - ], - 'created_at' => [ - 'type' => 'date', - ], - 'title' => [ - 'type' => 'text', - 'copy_to' => ['anime_slug'], - 'analyzer' => 'name_search', - ], - 'season' => [ - 'type' => 'long', - ], - 'slug' => [ - 'type' => 'text', - ], - 'synopsis' => [ - 'type' => 'text', - ], - 'updated_at' => [ - 'type' => 'date', - ], - 'year' => [ - 'type' => 'long', - ], - 'synonyms' => [ - 'type' => 'text', - 'analyzer' => 'name_search', - 'copy_to' => ['synonym_slug'], - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ], - ], - ], - 'anime_id' => [ - 'type' => 'long', - ], - 'created_at' => [ - 'type' => 'date', - ], - 'group' => [ - 'type' => 'nested', - 'properties' => [ - 'created_at' => [ - 'type' => 'date', - ], - 'group_id' => [ - 'type' => 'long', - ], - 'name' => [ - 'type' => 'text', - ], - 'slug' => [ - 'type' => 'text', - ], - 'updated_at' => [ - 'type' => 'date', - ], - ], - ], - 'group_id' => [ - 'type' => 'long', - ], - 'sequence' => [ - 'type' => 'long', - ], - 'slug' => [ - 'type' => 'text', - 'copy_to' => [ - 'anime_slug', - 'synonym_slug', - 'version_slug', - ], - ], - 'song' => [ - 'type' => 'nested', - 'properties' => [ - 'created_at' => [ - 'type' => 'date', - ], - 'song_id' => [ - 'type' => 'long', - ], - 'title' => [ - 'type' => 'text', - 'analyzer' => 'name_search', - ], - 'title_native' => [ - 'type' => 'text', - 'analyzer' => 'name_search', - ], - 'updated_at' => [ - 'type' => 'date', - ], - ], - ], - 'song_id' => [ - 'type' => 'long', - ], - 'theme_id' => [ - 'type' => 'long', - ], - 'type' => [ - 'type' => 'long', - ], - 'updated_at' => [ - 'type' => 'date', - ], - ], - ]); - $mapping->long('theme_id'); - $mapping->date('updated_at'); - $mapping->text('version', [ - 'copy_to' => [ - 'anime_slug', - 'synonym_slug', - 'version_slug', - ], - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('version_slug'); - }); - } - - /** - * Reverse the migration. - */ - public function down(): void - { - Index::dropIfExists('entries'); - } -} diff --git a/elastic/migrations/2020_12_22_034544_create_series_index.php b/elastic/migrations/2020_12_22_034544_create_series_index.php deleted file mode 100644 index dfa46300d..000000000 --- a/elastic/migrations/2020_12_22_034544_create_series_index.php +++ /dev/null @@ -1,91 +0,0 @@ -configureTextAnalyzers($settings); - - $mapping->date('created_at'); - $mapping->text('title', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->long('series_id'); - $mapping->text('slug', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->date('updated_at'); - $mapping->nested('anime', [ - 'properties' => [ - 'anime_id' => [ - 'type' => 'long', - ], - 'created_at' => [ - 'type' => 'date', - ], - 'title' => [ - 'type' => 'text', - 'copy_to' => ['anime_slug'], - 'analyzer' => 'name_search', - ], - 'season' => [ - 'type' => 'long', - ], - 'slug' => [ - 'type' => 'text', - ], - 'synopsis' => [ - 'type' => 'text', - ], - 'updated_at' => [ - 'type' => 'date', - ], - 'year' => [ - 'type' => 'long', - ], - 'synonyms' => [ - 'type' => 'text', - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ], - ], - ]); - $mapping->text('anime_slug'); - }); - } - - /** - * Reverse the migration. - */ - public function down(): void - { - Index::dropIfExists('series'); - } -} diff --git a/elastic/migrations/2020_12_22_034549_create_song_index.php b/elastic/migrations/2020_12_22_034549_create_song_index.php deleted file mode 100644 index 0e1f301a4..000000000 --- a/elastic/migrations/2020_12_22_034549_create_song_index.php +++ /dev/null @@ -1,52 +0,0 @@ -configureTextAnalyzers($settings); - - $mapping->date('created_at'); - $mapping->long('song_id'); - $mapping->text('title', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('title_native', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->date('updated_at'); - }); - } - - /** - * Reverse the migration. - */ - public function down(): void - { - Index::dropIfExists('songs'); - } -} diff --git a/elastic/migrations/2020_12_22_034557_create_theme_index.php b/elastic/migrations/2020_12_22_034557_create_theme_index.php deleted file mode 100644 index 9c1e4c067..000000000 --- a/elastic/migrations/2020_12_22_034557_create_theme_index.php +++ /dev/null @@ -1,121 +0,0 @@ -configureTextAnalyzers($settings); - - $mapping->nested('anime', [ - 'properties' => [ - 'anime_id' => [ - 'type' => 'long', - ], - 'created_at' => [ - 'type' => 'date', - ], - 'title' => [ - 'type' => 'text', - 'copy_to' => ['anime_slug'], - 'analyzer' => 'name_search', - ], - 'season' => [ - 'type' => 'long', - ], - 'slug' => [ - 'type' => 'text', - ], - 'synopsis' => [ - 'type' => 'text', - ], - 'updated_at' => [ - 'type' => 'date', - ], - 'year' => [ - 'type' => 'long', - ], - 'synonyms' => [ - 'type' => 'text', - 'analyzer' => 'name_search', - 'copy_to' => ['synonym_slug'], - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ], - ], - ]); - $mapping->long('anime_id'); - $mapping->text('anime_slug'); - $mapping->date('created_at'); - $mapping->long('group_id'); - $mapping->long('sequence'); - $mapping->text('slug', [ - 'copy_to' => [ - 'anime_slug', - 'synonym_slug', - ], - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->nested('song', [ - 'properties' => [ - 'created_at' => [ - 'type' => 'date', - ], - 'song_id' => [ - 'type' => 'long', - ], - 'title' => [ - 'type' => 'text', - 'analyzer' => 'name_search', - ], - 'title_keyword' => [ - 'type' => 'keyword', - ], - 'title_native' => [ - 'type' => 'text', - 'analyzer' => 'name_search', - ], - 'title_native_keyword' => [ - 'type' => 'keyword', - ], - 'updated_at' => [ - 'type' => 'date', - ], - ], - ]); - $mapping->long('song_id'); - $mapping->text('synonym_slug'); - $mapping->long('theme_id'); - $mapping->long('type'); - $mapping->date('updated_at'); - }); - } - - /** - * Reverse the migration. - */ - public function down(): void - { - Index::dropIfExists('themes'); - } -} diff --git a/elastic/migrations/2020_12_22_034601_create_video_index.php b/elastic/migrations/2020_12_22_034601_create_video_index.php deleted file mode 100644 index 183411b52..000000000 --- a/elastic/migrations/2020_12_22_034601_create_video_index.php +++ /dev/null @@ -1,243 +0,0 @@ -configureTextAnalyzers($settings); - - $mapping->text('anime_slug'); - $mapping->text('basename', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->date('created_at'); - $mapping->nested('entries', [ - 'properties' => [ - 'created_at' => [ - 'type' => 'date', - ], - 'entry_id' => [ - 'type' => 'long', - ], - 'episodes' => [ - 'type' => 'text', - ], - 'notes' => [ - 'type' => 'text', - ], - 'nsfw' => [ - 'type' => 'boolean', - ], - 'spoiler' => [ - 'type' => 'boolean', - ], - 'theme' => [ - 'type' => 'nested', - 'properties' => [ - 'anime' => [ - 'type' => 'nested', - 'properties' => [ - 'anime_id' => [ - 'type' => 'long', - ], - 'created_at' => [ - 'type' => 'date', - ], - 'title' => [ - 'type' => 'text', - 'copy_to' => ['anime_slug'], - 'analyzer' => 'name_search', - ], - 'season' => [ - 'type' => 'long', - ], - 'slug' => [ - 'type' => 'text', - ], - 'synopsis' => [ - 'type' => 'text', - ], - 'updated_at' => [ - 'type' => 'date', - ], - 'year' => [ - 'type' => 'long', - ], - 'synonyms' => [ - 'type' => 'text', - 'analyzer' => 'name_search', - 'copy_to' => ['synonym_slug'], - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ], - ], - ], - 'anime_id' => [ - 'type' => 'long', - ], - 'created_at' => [ - 'type' => 'date', - ], - 'group' => [ - 'type' => 'nested', - 'properties' => [ - 'created_at' => [ - 'type' => 'date', - ], - 'group_id' => [ - 'type' => 'long', - ], - 'name' => [ - 'type' => 'text', - ], - 'slug' => [ - 'type' => 'text', - ], - 'updated_at' => [ - 'type' => 'date', - ], - ], - ], - 'group_id' => [ - 'type' => 'long', - ], - 'sequence' => [ - 'type' => 'long', - ], - 'slug' => [ - 'type' => 'text', - 'copy_to' => [ - 'anime_slug', - 'synonym_slug', - 'tags_slug', - 'version_slug', - ], - ], - 'song' => [ - 'type' => 'nested', - 'properties' => [ - 'created_at' => [ - 'type' => 'date', - ], - 'song_id' => [ - 'type' => 'long', - ], - 'title' => [ - 'type' => 'text', - 'analyzer' => 'name_search', - ], - 'title_native' => [ - 'type' => 'text', - 'analyzer' => 'name_search', - ], - 'updated_at' => [ - 'type' => 'date', - ], - ], - ], - 'song_id' => [ - 'type' => 'long', - ], - 'theme_id' => [ - 'type' => 'long', - ], - 'type' => [ - 'type' => 'long', - ], - 'updated_at' => [ - 'type' => 'date', - ], - ], - ], - 'theme_id' => [ - 'type' => 'long', - ], - 'updated_at' => [ - 'type' => 'date', - ], - 'version' => [ - 'type' => 'text', - 'copy_to' => [ - 'anime_slug', - 'synonym_slug', - 'tags_slug', - 'version_slug', - ], - ], - ], - ]); - $mapping->text('filename', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->boolean('lyrics'); - $mapping->boolean('nc'); - $mapping->long('overlap'); - $mapping->text('path', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->long('resolution'); - $mapping->long('size'); - $mapping->text('mimetype', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->long('source'); - $mapping->boolean('subbed'); - $mapping->text('synonym_slug'); - $mapping->text('tags', [ - 'copy_to' => [ - 'anime_slug', - 'synonym_slug', - 'tags_slug', - ], - ]); - $mapping->text('tags_slug'); - $mapping->boolean('uncen'); - $mapping->date('updated_at'); - $mapping->text('version_slug'); - $mapping->long('video_id'); - }); - } - - /** - * Reverse the migration. - */ - public function down(): void - { - Index::dropIfExists('videos'); - } -} diff --git a/elastic/migrations/2021_08_20_213637_create_studio_index.php b/elastic/migrations/2021_08_20_213637_create_studio_index.php deleted file mode 100644 index 1ebdab889..000000000 --- a/elastic/migrations/2021_08_20_213637_create_studio_index.php +++ /dev/null @@ -1,51 +0,0 @@ -configureTextAnalyzers($settings); - - $mapping->date('created_at'); - $mapping->text('name', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('slug', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->long('studio_id'); - $mapping->date('updated_at'); - }); - } - - /** - * Reverse the migration. - */ - public function down(): void - { - Index::dropIfExists('studios'); - } -} diff --git a/elastic/migrations/2022_10_19_050811_create_playlist_index.php b/elastic/migrations/2022_10_19_050811_create_playlist_index.php deleted file mode 100644 index 71096ee87..000000000 --- a/elastic/migrations/2022_10_19_050811_create_playlist_index.php +++ /dev/null @@ -1,58 +0,0 @@ -configureTextAnalyzers($settings); - - $mapping->long('playlist_id'); - $mapping->date('created_at'); - $mapping->text('hashids', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('name', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->text('description', [ - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->date('updated_at'); - }); - } - - /** - * Reverse the migration. - */ - public function down(): void - { - Index::dropIfExists('playlists'); - } -} diff --git a/elastic/migrations/2025_05_14_001128_create_profile_index.php b/elastic/migrations/2025_05_14_001128_create_profile_index.php deleted file mode 100644 index 566b294d8..000000000 --- a/elastic/migrations/2025_05_14_001128_create_profile_index.php +++ /dev/null @@ -1,45 +0,0 @@ -configureTextAnalyzers($settings); - - $mapping->long('profile_id'); - $mapping->date('created_at'); - $mapping->text('name', [ - 'analyzer' => 'name_search', - 'fields' => [ - 'keyword' => [ - 'type' => 'keyword', - ], - ], - ]); - $mapping->long('site'); - $mapping->date('updated_at'); - }); - } - - /** - * Reverse the migration. - */ - public function down(): void - { - Index::dropIfExists('profiles'); - } -} diff --git a/phpstan.neon b/phpstan.neon index 200f2b2b5..0dfaa848b 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -11,7 +11,6 @@ parameters: - app - config - database - - elastic - routes - tests diff --git a/rector.php b/rector.php index ed35be550..5602484ab 100644 --- a/rector.php +++ b/rector.php @@ -2,6 +2,8 @@ declare(strict_types=1); +use Pest\Rector\Rules\ChainExpectCallsRector; +use Pest\Rector\Set\PestSetList; use Rector\Caching\ValueObject\Storage\FileCacheStorage; use Rector\CodingStyle\Rector\ArrowFunction\ArrowFunctionDelegatingCallToFirstClassCallableRector; use Rector\CodingStyle\Rector\Closure\ClosureDelegatingCallToFirstClassCallableRector; @@ -14,7 +16,6 @@ use RectorLaravel\Rector\MethodCall\ConvertEnumerableToArrayToAllRector; use RectorLaravel\Rector\MethodCall\ResponseHelperCallToJsonResponseRector; use RectorLaravel\Rector\StaticCall\DispatchToHelperFunctionsRector; use RectorLaravel\Set\LaravelSetList; -use RectorPest\Set\PestSetList; return RectorConfig::configure() ->withComposerBased(laravel: true) @@ -28,7 +29,7 @@ return RectorConfig::configure() LaravelSetList::LARAVEL_FACADE_ALIASES_TO_FULL_NAMES, LaravelSetList::LARAVEL_IF_HELPERS, LaravelSetList::LARAVEL_LEGACY_FACTORIES_TO_CLASSES, - PestSetList::PEST_CODE_QUALITY, + PestSetList::CODING_STYLE, ]) ->withRules([ ResponseHelperCallToJsonResponseRector::class, @@ -53,6 +54,7 @@ return RectorConfig::configure() __DIR__.'/database/migrations', AddOverrideAttributeToOverriddenMethodsRector::class, AddOverrideAttributeToOverriddenPropertiesRector::class, + ChainExpectCallsRector::class, DispatchToHelperFunctionsRector::class, ConvertEnumerableToArrayToAllRector::class, ArrowFunctionDelegatingCallToFirstClassCallableRector::class, diff --git a/tests/Feature/Actions/Fortify/CreateNewUserTest.php b/tests/Feature/Actions/Fortify/CreateNewUserTest.php index e3c9214cc..f486a16cc 100644 --- a/tests/Feature/Actions/Fortify/CreateNewUserTest.php +++ b/tests/Feature/Actions/Fortify/CreateNewUserTest.php @@ -14,7 +14,7 @@ use Illuminate\Validation\ValidationException; use Mockery\MockInterface; use Propaganistas\LaravelDisposableEmail\Validation\Indisposable; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('required', function (): void { $this->expectException(ValidationException::class); @@ -129,10 +129,7 @@ test('created if open ai fails', function (): void { }); test('validation error when flagged by open ai', function (): void { - $this->expectException(ValidationException::class); - - Config::set(ValidationConstants::MODERATION_SERVICE_QUALIFIED, ModerationService::OPENAI->value); - + expect(fn () => Config::set(ValidationConstants::MODERATION_SERVICE_QUALIFIED, ModerationService::OPENAI->value))->toThrow(ValidationException::class); Http::fake([ 'https://api.openai.com/v1/moderations' => Http::response([ 'results' => [ @@ -157,11 +154,11 @@ test('validation error when flagged by open ai', function (): void { }); test('disposable email', function (): void { - $this->expectException(ValidationException::class); - - $this->mock(Indisposable::class, function (MockInterface $mock): void { - $mock->shouldReceive('validate')->once()->andReturn(false); - }); + expect(function (): void { + $this->mock(Indisposable::class, function (MockInterface $mock): void { + $mock->shouldReceive('validate')->once()->andReturn(false); + }); + })->toThrow(ValidationException::class); $action = new CreateNewUser(); diff --git a/tests/Feature/Actions/Fortify/UpdateUserProfileInformationTest.php b/tests/Feature/Actions/Fortify/UpdateUserProfileInformationTest.php index 3d4f09d7e..7f06999c7 100644 --- a/tests/Feature/Actions/Fortify/UpdateUserProfileInformationTest.php +++ b/tests/Feature/Actions/Fortify/UpdateUserProfileInformationTest.php @@ -15,7 +15,7 @@ use Illuminate\Validation\ValidationException; use Mockery\MockInterface; use Propaganistas\LaravelDisposableEmail\Validation\Indisposable; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('required', function (): void { $this->expectException(ValidationException::class); @@ -166,10 +166,7 @@ test('created if open ai fails', function (): void { }); test('validation error when flagged by open ai', function (): void { - $this->expectException(ValidationException::class); - - Config::set(ValidationConstants::MODERATION_SERVICE_QUALIFIED, ModerationService::OPENAI->value); - + expect(fn () => Config::set(ValidationConstants::MODERATION_SERVICE_QUALIFIED, ModerationService::OPENAI->value))->toThrow(ValidationException::class); Http::fake([ 'https://api.openai.com/v1/moderations' => Http::response([ 'results' => [ @@ -194,11 +191,11 @@ test('validation error when flagged by open ai', function (): void { }); test('disposable email', function (): void { - $this->expectException(ValidationException::class); - - $this->mock(Indisposable::class, function (MockInterface $mock): void { - $mock->shouldReceive('validate')->once()->andReturn(false); - }); + expect(function (): void { + $this->mock(Indisposable::class, function (MockInterface $mock): void { + $mock->shouldReceive('validate')->once()->andReturn(false); + }); + })->toThrow(ValidationException::class); $email = fake()->unique()->companyEmail(); diff --git a/tests/Feature/Actions/Models/Document/UpdatePageRelationsTest.php b/tests/Feature/Actions/Models/Document/UpdatePageRelationsTest.php index f0270a9de..6ee6d5c08 100644 --- a/tests/Feature/Actions/Models/Document/UpdatePageRelationsTest.php +++ b/tests/Feature/Actions/Models/Document/UpdatePageRelationsTest.php @@ -18,7 +18,7 @@ test('associates next of previous page', function (): void { $previous->refresh(); - $this->assertTrue($previous->next()->is($page)); + expect($previous->next()->is($page))->toBeTrue(); }); test('associates previous of next page', function (): void { @@ -34,5 +34,5 @@ test('associates previous of next page', function (): void { $next->refresh(); - $this->assertTrue($next->previous()->is($page)); + expect($next->previous()->is($page))->toBeTrue(); }); diff --git a/tests/Feature/Actions/Models/List/Playlist/InsertTrackAfterTest.php b/tests/Feature/Actions/Models/List/Playlist/InsertTrackAfterTest.php index 506dafbf6..0047fb75a 100644 --- a/tests/Feature/Actions/Models/List/Playlist/InsertTrackAfterTest.php +++ b/tests/Feature/Actions/Models/List/Playlist/InsertTrackAfterTest.php @@ -8,7 +8,7 @@ use App\Models\List\Playlist\PlaylistTrack; use App\Models\Wiki\Video; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('last track', function (): void { $playlist = Playlist::factory() @@ -26,12 +26,12 @@ test('last track', function (): void { $action->insertAfter($playlist, $track, $last); - $this->assertTrue($playlist->last()->is($track)); + expect($playlist->last()->is($track))->toBeTrue(); - $this->assertTrue($last->next()->is($track)); + expect($last->next()->is($track))->toBeTrue(); - $this->assertTrue($track->previous()->is($last)); - $this->assertTrue($track->next()->doesntExist()); + expect($track->previous()->is($last))->toBeTrue(); + expect($track->next()->doesntExist())->toBeTrue(); }); test('first track', function (): void { @@ -52,10 +52,10 @@ test('first track', function (): void { $action->insertAfter($playlist, $track, $first); - $this->assertTrue($playlist->first()->is($first)); + expect($playlist->first()->is($first))->toBeTrue(); - $this->assertTrue($first->next()->is($track)); + expect($first->next()->is($track))->toBeTrue(); - $this->assertTrue($track->previous()->is($first)); - $this->assertTrue($track->next()->is($next)); + expect($track->previous()->is($first))->toBeTrue(); + expect($track->next()->is($next))->toBeTrue(); }); diff --git a/tests/Feature/Actions/Models/List/Playlist/InsertTrackBeforeTest.php b/tests/Feature/Actions/Models/List/Playlist/InsertTrackBeforeTest.php index 5689e3af2..13c36d188 100644 --- a/tests/Feature/Actions/Models/List/Playlist/InsertTrackBeforeTest.php +++ b/tests/Feature/Actions/Models/List/Playlist/InsertTrackBeforeTest.php @@ -8,7 +8,7 @@ use App\Models\List\Playlist\PlaylistTrack; use App\Models\Wiki\Video; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('first track', function (): void { $playlist = Playlist::factory() @@ -26,12 +26,12 @@ test('first track', function (): void { $action->insertBefore($playlist, $track, $first); - $this->assertTrue($playlist->first()->is($track)); + expect($playlist->first()->is($track))->toBeTrue(); - $this->assertTrue($first->previous()->is($track)); + expect($first->previous()->is($track))->toBeTrue(); - $this->assertTrue($track->next()->is($first)); - $this->assertTrue($track->previous()->doesntExist()); + expect($track->next()->is($first))->toBeTrue(); + expect($track->previous()->doesntExist())->toBeTrue(); }); test('last track', function (): void { @@ -52,10 +52,10 @@ test('last track', function (): void { $action->insertBefore($playlist, $track, $last); - $this->assertTrue($playlist->last()->is($last)); + expect($playlist->last()->is($last))->toBeTrue(); - $this->assertTrue($last->previous()->is($track)); + expect($last->previous()->is($track))->toBeTrue(); - $this->assertTrue($track->previous()->is($previous)); - $this->assertTrue($track->next()->is($last)); + expect($track->previous()->is($previous))->toBeTrue(); + expect($track->next()->is($last))->toBeTrue(); }); diff --git a/tests/Feature/Actions/Models/List/Playlist/InsertTrackTest.php b/tests/Feature/Actions/Models/List/Playlist/InsertTrackTest.php index 629a259d0..f52670c89 100644 --- a/tests/Feature/Actions/Models/List/Playlist/InsertTrackTest.php +++ b/tests/Feature/Actions/Models/List/Playlist/InsertTrackTest.php @@ -19,8 +19,8 @@ test('first track', function (): void { $action->insert($playlist, $track); - $this->assertTrue($playlist->first()->is($track)); - $this->assertTrue($playlist->last()->is($track)); + expect($playlist->first()->is($track))->toBeTrue(); + expect($playlist->last()->is($track))->toBeTrue(); }); test('second track', function (): void { @@ -41,14 +41,14 @@ test('second track', function (): void { $action->insert($playlist, $first); $action->insert($playlist, $second); - $this->assertTrue($playlist->first()->is($first)); - $this->assertTrue($playlist->last()->is($second)); + expect($playlist->first()->is($first))->toBeTrue(); + expect($playlist->last()->is($second))->toBeTrue(); - $this->assertTrue($first->previous()->doesntExist()); - $this->assertTrue($first->next()->is($second)); + expect($first->previous()->doesntExist())->toBeTrue(); + expect($first->next()->is($second))->toBeTrue(); - $this->assertTrue($second->previous()->is($first)); - $this->assertTrue($second->next()->doesntExist()); + expect($second->previous()->is($first))->toBeTrue(); + expect($second->next()->doesntExist())->toBeTrue(); }); test('third track', function (): void { @@ -75,15 +75,15 @@ test('third track', function (): void { $action->insert($playlist, $second); $action->insert($playlist, $third); - $this->assertTrue($playlist->first()->is($first)); - $this->assertTrue($playlist->last()->is($third)); + expect($playlist->first()->is($first))->toBeTrue(); + expect($playlist->last()->is($third))->toBeTrue(); - $this->assertTrue($first->previous()->doesntExist()); - $this->assertTrue($first->next()->is($second)); + expect($first->previous()->doesntExist())->toBeTrue(); + expect($first->next()->is($second))->toBeTrue(); - $this->assertTrue($second->previous()->is($first)); - $this->assertTrue($second->next()->is($third)); + expect($second->previous()->is($first))->toBeTrue(); + expect($second->next()->is($third))->toBeTrue(); - $this->assertTrue($third->previous()->is($second)); - $this->assertTrue($third->next()->doesntExist()); + expect($third->previous()->is($second))->toBeTrue(); + expect($third->next()->doesntExist())->toBeTrue(); }); diff --git a/tests/Feature/Actions/Models/List/Playlist/RemoveTrackTest.php b/tests/Feature/Actions/Models/List/Playlist/RemoveTrackTest.php index fe01dae7e..537ce6258 100644 --- a/tests/Feature/Actions/Models/List/Playlist/RemoveTrackTest.php +++ b/tests/Feature/Actions/Models/List/Playlist/RemoveTrackTest.php @@ -6,7 +6,7 @@ use App\Actions\Models\List\Playlist\RemoveTrackAction; use App\Models\List\Playlist; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('remove sole', function (): void { $playlist = Playlist::factory() @@ -19,11 +19,11 @@ test('remove sole', function (): void { $action->remove($playlist, $first); - $this->assertTrue($playlist->first()->doesntExist()); - $this->assertTrue($playlist->last()->doesntExist()); + expect($playlist->first()->doesntExist())->toBeTrue(); + expect($playlist->last()->doesntExist())->toBeTrue(); - $this->assertTrue($first->previous()->doesntExist()); - $this->assertTrue($first->next()->doesntExist()); + expect($first->previous()->doesntExist())->toBeTrue(); + expect($first->next()->doesntExist())->toBeTrue(); }); test('remove first', function (): void { @@ -38,12 +38,12 @@ test('remove first', function (): void { $action->remove($playlist, $first); - $this->assertTrue($playlist->first()->is($second)); + expect($playlist->first()->is($second))->toBeTrue(); - $this->assertTrue($first->previous()->doesntExist()); - $this->assertTrue($first->next()->doesntExist()); + expect($first->previous()->doesntExist())->toBeTrue(); + expect($first->next()->doesntExist())->toBeTrue(); - $this->assertTrue($second->previous()->doesntExist()); + expect($second->previous()->doesntExist())->toBeTrue(); }); test('remove last', function (): void { @@ -58,12 +58,12 @@ test('remove last', function (): void { $action->remove($playlist, $last); - $this->assertTrue($playlist->last()->is($previous)); + expect($playlist->last()->is($previous))->toBeTrue(); - $this->assertTrue($last->previous()->doesntExist()); - $this->assertTrue($last->next()->doesntExist()); + expect($last->previous()->doesntExist())->toBeTrue(); + expect($last->next()->doesntExist())->toBeTrue(); - $this->assertTrue($previous->next()->doesntExist()); + expect($previous->next()->doesntExist())->toBeTrue(); }); test('remove second', function (): void { @@ -79,15 +79,15 @@ test('remove second', function (): void { $action->remove($playlist, $second); - $this->assertTrue($playlist->first()->is($first)); - $this->assertTrue($playlist->last()->is($third)); + expect($playlist->first()->is($first))->toBeTrue(); + expect($playlist->last()->is($third))->toBeTrue(); - $this->assertTrue($first->previous()->doesntExist()); - $this->assertTrue($first->next()->is($third)); + expect($first->previous()->doesntExist())->toBeTrue(); + expect($first->next()->is($third))->toBeTrue(); - $this->assertTrue($second->previous()->doesntExist()); - $this->assertTrue($second->next()->doesntExist()); + expect($second->previous()->doesntExist())->toBeTrue(); + expect($second->next()->doesntExist())->toBeTrue(); - $this->assertTrue($third->previous()->is($first)); - $this->assertTrue($third->next()->doesntExist()); + expect($third->previous()->is($first))->toBeTrue(); + expect($third->next()->doesntExist())->toBeTrue(); }); diff --git a/tests/Feature/Actions/Models/Wiki/Image/OptimizeImageTest.php b/tests/Feature/Actions/Models/Wiki/Image/OptimizeImageTest.php index a1d55c3a0..e804abb3e 100644 --- a/tests/Feature/Actions/Models/Wiki/Image/OptimizeImageTest.php +++ b/tests/Feature/Actions/Models/Wiki/Image/OptimizeImageTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('skipped', function (): void { $fs = Storage::fake(Config::get(ImageConstants::DISKS_QUALIFIED)); @@ -27,9 +27,9 @@ test('skipped', function (): void { $result = $action->handle(); - $this->assertTrue($result->getStatus() === ActionStatus::SKIPPED); + expect($result->getStatus())->toBe(ActionStatus::SKIPPED); $this->assertDatabaseCount(Image::class, 1); - $this->assertTrue($image->exists()); + expect($image->exists())->toBeTrue(); }); test('converts to avif', function (): void { @@ -45,10 +45,10 @@ test('converts to avif', function (): void { $result = $action->handle(); - $this->assertTrue(Str::endsWith(($image->refresh()->path), '.avif')); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect(Str::endsWith(($image->refresh()->path), '.avif'))->toBeTrue(); + expect($result->getStatus())->toBe(ActionStatus::PASSED); $this->assertDatabaseCount(Image::class, 1); - $this->assertTrue($image->exists()); + expect($image->exists())->toBeTrue(); }); test('downscale', function (): void { @@ -64,7 +64,7 @@ test('downscale', function (): void { $result = $action->handle(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); $this->assertDatabaseCount(Image::class, 1); - $this->assertTrue($image->exists()); + expect($image->exists())->toBeTrue(); }); diff --git a/tests/Feature/Actions/Models/Wiki/Video/Audio/BackfillVideoAudioTest.php b/tests/Feature/Actions/Models/Wiki/Video/Audio/BackfillVideoAudioTest.php index f18e37d04..cbf9bcc57 100644 --- a/tests/Feature/Actions/Models/Wiki/Video/Audio/BackfillVideoAudioTest.php +++ b/tests/Feature/Actions/Models/Wiki/Video/Audio/BackfillVideoAudioTest.php @@ -17,7 +17,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('skipped', function (): void { Storage::fake(Config::get(VideoConstants::DEFAULT_DISK_QUALIFIED)); @@ -31,9 +31,9 @@ test('skipped', function (): void { $result = $action->handle(); - $this->assertTrue($result->getStatus() === ActionStatus::SKIPPED); + expect($result->getStatus())->toBe(ActionStatus::SKIPPED); $this->assertDatabaseCount(Audio::class, 1); - $this->assertEmpty(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles()); + expect(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles())->toBeEmpty(); }); test('failed when no entries', function (): void { @@ -46,9 +46,9 @@ test('failed when no entries', function (): void { $result = $action->handle(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); $this->assertDatabaseCount(Audio::class, 0); - $this->assertEmpty(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles()); + expect(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles())->toBeEmpty(); }); test('passes source video', function (): void { @@ -69,10 +69,10 @@ test('passes source video', function (): void { $result = $action->handle(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); $this->assertDatabaseCount(Audio::class, 1); - $this->assertTrue($video->audio()->exists()); - $this->assertEmpty(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles()); + expect($video->audio()->exists())->toBeTrue(); + expect(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles())->toBeEmpty(); }); test('passes with higher priority source', function (): void { @@ -98,10 +98,10 @@ test('passes with higher priority source', function (): void { $result = $action->handle(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); $this->assertDatabaseCount(Audio::class, 1); - $this->assertTrue($video->audio()->exists()); - $this->assertEmpty(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles()); + expect($video->audio()->exists())->toBeTrue(); + expect(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles())->toBeEmpty(); }); test('passes with primary version source', function (): void { @@ -134,8 +134,8 @@ test('passes with primary version source', function (): void { $result = $action->handle(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); $this->assertDatabaseCount(Audio::class, 2); - $this->assertTrue($video->audio()->is($sourceAudio)); - $this->assertEmpty(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles()); + expect($video->audio()->is($sourceAudio))->toBeTrue(); + expect(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles())->toBeEmpty(); }); diff --git a/tests/Feature/Actions/Repositories/Admin/Dump/ReconcileDumpRepositoriesTest.php b/tests/Feature/Actions/Repositories/Admin/Dump/ReconcileDumpRepositoriesTest.php index 3e2337c99..042cb0dde 100644 --- a/tests/Feature/Actions/Repositories/Admin/Dump/ReconcileDumpRepositoriesTest.php +++ b/tests/Feature/Actions/Repositories/Admin/Dump/ReconcileDumpRepositoriesTest.php @@ -15,7 +15,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Storage; use Mockery\MockInterface; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no results', function (): void { Storage::fake(Config::get(DumpConstants::DISK_QUALIFIED)); @@ -31,8 +31,8 @@ test('no results', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertFalse($result->hasChanges()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeFalse(); $this->assertDatabaseCount(Dump::class, 0); }); @@ -54,9 +54,9 @@ test('created', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertTrue($result->hasChanges()); - $this->assertCount($createdDumpCount, $result->getCreated()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeTrue(); + expect($result->getCreated())->toHaveCount($createdDumpCount); $this->assertDatabaseCount(Dump::class, $createdDumpCount); }); @@ -78,8 +78,8 @@ test('deleted', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertTrue($result->hasChanges()); - $this->assertCount($deletedDumpCount, $result->getDeleted()); - $this->assertEmpty(Dump::all()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeTrue(); + expect($result->getDeleted())->toHaveCount($deletedDumpCount); + expect(Dump::all())->toBeEmpty(); }); diff --git a/tests/Feature/Actions/Repositories/Wiki/Audio/ReconcileAudioRepositoriesTest.php b/tests/Feature/Actions/Repositories/Wiki/Audio/ReconcileAudioRepositoriesTest.php index 18a05bb45..c38ba0c1c 100644 --- a/tests/Feature/Actions/Repositories/Wiki/Audio/ReconcileAudioRepositoriesTest.php +++ b/tests/Feature/Actions/Repositories/Wiki/Audio/ReconcileAudioRepositoriesTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\App; use Mockery\MockInterface; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no results', function (): void { $this->mock(AudioSourceRepository::class, function (MockInterface $mock): void { @@ -27,8 +27,8 @@ test('no results', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertFalse($result->hasChanges()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeFalse(); $this->assertDatabaseCount(Audio::class, 0); }); @@ -48,9 +48,9 @@ test('created', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertTrue($result->hasChanges()); - $this->assertCount($createdAudioCount, $result->getCreated()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeTrue(); + expect($result->getCreated())->toHaveCount($createdAudioCount); $this->assertDatabaseCount(Audio::class, $createdAudioCount); }); @@ -70,9 +70,9 @@ test('deleted', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertTrue($result->hasChanges()); - $this->assertCount($deletedAudioCount, $result->getDeleted()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeTrue(); + expect($result->getDeleted())->toHaveCount($deletedAudioCount); $this->assertDatabaseCount(Audio::class, $deletedAudioCount); foreach ($audios as $audio) { @@ -106,8 +106,8 @@ test('updated', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertTrue($result->hasChanges()); - $this->assertCount($updatedAudioCount, $result->getUpdated()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeTrue(); + expect($result->getUpdated())->toHaveCount($updatedAudioCount); $this->assertDatabaseCount(Audio::class, $updatedAudioCount); }); diff --git a/tests/Feature/Actions/Repositories/Wiki/Video/ReconcileVideoRepositoriesTest.php b/tests/Feature/Actions/Repositories/Wiki/Video/ReconcileVideoRepositoriesTest.php index 684c966ab..0c039ff8b 100644 --- a/tests/Feature/Actions/Repositories/Wiki/Video/ReconcileVideoRepositoriesTest.php +++ b/tests/Feature/Actions/Repositories/Wiki/Video/ReconcileVideoRepositoriesTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\App; use Mockery\MockInterface; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no results', function (): void { $this->mock(VideoSourceRepository::class, function (MockInterface $mock): void { @@ -27,8 +27,8 @@ test('no results', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertFalse($result->hasChanges()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeFalse(); $this->assertDatabaseCount(Video::class, 0); }); @@ -48,9 +48,9 @@ test('created', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertTrue($result->hasChanges()); - $this->assertCount($createdVideoCount, $result->getCreated()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeTrue(); + expect($result->getCreated())->toHaveCount($createdVideoCount); $this->assertDatabaseCount(Video::class, $createdVideoCount); }); @@ -70,9 +70,9 @@ test('deleted', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertTrue($result->hasChanges()); - $this->assertCount($deletedVideoCount, $result->getDeleted()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeTrue(); + expect($result->getDeleted())->toHaveCount($deletedVideoCount); $this->assertDatabaseCount(Video::class, $deletedVideoCount); foreach ($videos as $video) { @@ -106,8 +106,8 @@ test('updated', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertTrue($result->hasChanges()); - $this->assertCount($updatedVideoCount, $result->getUpdated()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeTrue(); + expect($result->getUpdated())->toHaveCount($updatedVideoCount); $this->assertDatabaseCount(Video::class, $updatedVideoCount); }); diff --git a/tests/Feature/Actions/Repositories/Wiki/Video/Script/ReconcileScriptRepositoriesTest.php b/tests/Feature/Actions/Repositories/Wiki/Video/Script/ReconcileScriptRepositoriesTest.php index a24f1e9d7..8678ade70 100644 --- a/tests/Feature/Actions/Repositories/Wiki/Video/Script/ReconcileScriptRepositoriesTest.php +++ b/tests/Feature/Actions/Repositories/Wiki/Video/Script/ReconcileScriptRepositoriesTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\App; use Mockery\MockInterface; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no results', function (): void { $this->mock(ScriptSourceRepository::class, function (MockInterface $mock): void { @@ -26,8 +26,8 @@ test('no results', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertFalse($result->hasChanges()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeFalse(); $this->assertDatabaseCount(VideoScript::class, 0); }); @@ -47,9 +47,9 @@ test('created', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertTrue($result->hasChanges()); - $this->assertCount($createdScriptCount, $result->getCreated()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeTrue(); + expect($result->getCreated())->toHaveCount($createdScriptCount); $this->assertDatabaseCount(VideoScript::class, $createdScriptCount); }); @@ -69,9 +69,9 @@ test('deleted', function (): void { $result = $action->reconcileRepositories($source, $destination); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertTrue($result->hasChanges()); - $this->assertCount($deletedScriptCount, $result->getDeleted()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($result->hasChanges())->toBeTrue(); + expect($result->getDeleted())->toHaveCount($deletedScriptCount); $this->assertDatabaseCount(VideoScript::class, $deletedScriptCount); foreach ($scripts as $script) { diff --git a/tests/Feature/Actions/Storage/Admin/Dump/DumpDocumentTest.php b/tests/Feature/Actions/Storage/Admin/Dump/DumpDocumentTest.php index cd080c0bf..00071580e 100644 --- a/tests/Feature/Actions/Storage/Admin/Dump/DumpDocumentTest.php +++ b/tests/Feature/Actions/Storage/Admin/Dump/DumpDocumentTest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('database dump output', function (): void { $local = Storage::fake('local'); @@ -23,8 +23,8 @@ test('database dump output', function (): void { $result = $action->handle(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertEmpty($local->allFiles()); - $this->assertCount(1, $fs->allFiles()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($local->allFiles())->toBeEmpty(); + expect($fs->allFiles())->toHaveCount(1); $this->assertDatabaseCount(Dump::class, 1); }); diff --git a/tests/Feature/Actions/Storage/Admin/Dump/DumpWikiTest.php b/tests/Feature/Actions/Storage/Admin/Dump/DumpWikiTest.php index d6b1b7846..8363de732 100644 --- a/tests/Feature/Actions/Storage/Admin/Dump/DumpWikiTest.php +++ b/tests/Feature/Actions/Storage/Admin/Dump/DumpWikiTest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('database dump output', function (): void { $local = Storage::fake('local'); @@ -23,8 +23,8 @@ test('database dump output', function (): void { $result = $action->handle(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertEmpty($local->allFiles()); - $this->assertCount(1, $fs->allFiles()); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect($local->allFiles())->toBeEmpty(); + expect($fs->allFiles())->toHaveCount(1); $this->assertDatabaseCount(Dump::class, 1); }); diff --git a/tests/Feature/Actions/Storage/Admin/Dump/PruneDumpTest.php b/tests/Feature/Actions/Storage/Admin/Dump/PruneDumpTest.php index 32bf1038f..0ce437f4d 100644 --- a/tests/Feature/Actions/Storage/Admin/Dump/PruneDumpTest.php +++ b/tests/Feature/Actions/Storage/Admin/Dump/PruneDumpTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no results', function (): void { $fs = Storage::fake(Config::get(DumpConstants::DISK_QUALIFIED)); @@ -24,8 +24,8 @@ test('no results', function (): void { $result = $pruneResults->toActionResult(); - $this->assertEmpty($fs->allFiles()); - $this->assertTrue($result->hasFailed()); + expect($fs->allFiles())->toBeEmpty(); + expect($result->hasFailed())->toBeTrue(); $this->assertDatabaseCount(Dump::class, 0); }); @@ -52,7 +52,7 @@ test('pruned', function (): void { $result = $pruneResults->toActionResult(); - $this->assertEmpty($fs->allFiles()); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); - $this->assertEmpty(Dump::all()); + expect($fs->allFiles())->toBeEmpty(); + expect($result->getStatus())->toBe(ActionStatus::PASSED); + expect(Dump::all())->toBeEmpty(); }); diff --git a/tests/Feature/Actions/Storage/Wiki/Audio/DeleteAudioTest.php b/tests/Feature/Actions/Storage/Wiki/Audio/DeleteAudioTest.php index 714c7e4cb..472fa4f04 100644 --- a/tests/Feature/Actions/Storage/Wiki/Audio/DeleteAudioTest.php +++ b/tests/Feature/Actions/Storage/Wiki/Audio/DeleteAudioTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\File as FileFacade; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Config::set(AudioConstants::DISKS_QUALIFIED, []); @@ -27,7 +27,7 @@ test('default', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -49,7 +49,7 @@ test('passed', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); test('deleted from disk', function (): void { @@ -69,7 +69,7 @@ test('deleted from disk', function (): void { $action->handle(); - $this->assertEmpty(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles()); + expect(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles())->toBeEmpty(); }); test('audio deleted', function (): void { diff --git a/tests/Feature/Actions/Storage/Wiki/Audio/MoveAudioTest.php b/tests/Feature/Actions/Storage/Wiki/Audio/MoveAudioTest.php index 800e779dd..5172fe42e 100644 --- a/tests/Feature/Actions/Storage/Wiki/Audio/MoveAudioTest.php +++ b/tests/Feature/Actions/Storage/Wiki/Audio/MoveAudioTest.php @@ -15,7 +15,7 @@ use Illuminate\Support\Facades\File as FileFacade; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Config::set(AudioConstants::DISKS_QUALIFIED, []); @@ -29,7 +29,7 @@ test('default', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -54,7 +54,7 @@ test('passed', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); test('moved in disk', function (): void { diff --git a/tests/Feature/Actions/Storage/Wiki/Audio/UploadAudioTest.php b/tests/Feature/Actions/Storage/Wiki/Audio/UploadAudioTest.php index 41be6311e..007312563 100644 --- a/tests/Feature/Actions/Storage/Wiki/Audio/UploadAudioTest.php +++ b/tests/Feature/Actions/Storage/Wiki/Audio/UploadAudioTest.php @@ -11,7 +11,7 @@ use Illuminate\Http\Testing\File; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Config::set(AudioConstants::DISKS_QUALIFIED, []); @@ -25,7 +25,7 @@ test('default', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -40,7 +40,7 @@ test('passed', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); test('uploaded to disk', function (): void { @@ -53,7 +53,7 @@ test('uploaded to disk', function (): void { $action->handle(); - $this->assertCount(1, Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles()); + expect(Storage::disk(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED))->allFiles())->toHaveCount(1); }); test('created audio', function (): void { diff --git a/tests/Feature/Actions/Storage/Wiki/Video/DeleteVideoTest.php b/tests/Feature/Actions/Storage/Wiki/Video/DeleteVideoTest.php index 9d41cf280..1dd3340bc 100644 --- a/tests/Feature/Actions/Storage/Wiki/Video/DeleteVideoTest.php +++ b/tests/Feature/Actions/Storage/Wiki/Video/DeleteVideoTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\File as FileFacade; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Config::set(VideoConstants::DISKS_QUALIFIED, []); @@ -27,7 +27,7 @@ test('default', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -49,7 +49,7 @@ test('passed', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); test('deleted from disk', function (): void { @@ -69,7 +69,7 @@ test('deleted from disk', function (): void { $action->handle(); - $this->assertEmpty(Storage::disk(Config::get(VideoConstants::DEFAULT_DISK_QUALIFIED))->allFiles()); + expect(Storage::disk(Config::get(VideoConstants::DEFAULT_DISK_QUALIFIED))->allFiles())->toBeEmpty(); }); test('video deleted', function (): void { diff --git a/tests/Feature/Actions/Storage/Wiki/Video/MoveVideoTest.php b/tests/Feature/Actions/Storage/Wiki/Video/MoveVideoTest.php index 3c57cf038..52d2cee6d 100644 --- a/tests/Feature/Actions/Storage/Wiki/Video/MoveVideoTest.php +++ b/tests/Feature/Actions/Storage/Wiki/Video/MoveVideoTest.php @@ -15,7 +15,7 @@ use Illuminate\Support\Facades\File as FileFacade; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Config::set(VideoConstants::DISKS_QUALIFIED, []); @@ -29,7 +29,7 @@ test('default', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -54,7 +54,7 @@ test('passed', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); test('moved in disk', function (): void { diff --git a/tests/Feature/Actions/Storage/Wiki/Video/Script/DeleteScriptTest.php b/tests/Feature/Actions/Storage/Wiki/Video/Script/DeleteScriptTest.php index c3fac837e..1d723331c 100644 --- a/tests/Feature/Actions/Storage/Wiki/Video/Script/DeleteScriptTest.php +++ b/tests/Feature/Actions/Storage/Wiki/Video/Script/DeleteScriptTest.php @@ -11,7 +11,7 @@ use Illuminate\Http\Testing\File; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Config::set(VideoConstants::SCRIPT_DISK_QUALIFIED, []); @@ -25,7 +25,7 @@ test('default', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -43,7 +43,7 @@ test('passed', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); test('deleted from disk', function (): void { @@ -59,7 +59,7 @@ test('deleted from disk', function (): void { $action->handle(); - $this->assertEmpty($fs->allFiles()); + expect($fs->allFiles())->toBeEmpty(); }); test('video deleted', function (): void { diff --git a/tests/Feature/Actions/Storage/Wiki/Video/Script/MoveScriptTest.php b/tests/Feature/Actions/Storage/Wiki/Video/Script/MoveScriptTest.php index 965e2c1e5..378f8b9fb 100644 --- a/tests/Feature/Actions/Storage/Wiki/Video/Script/MoveScriptTest.php +++ b/tests/Feature/Actions/Storage/Wiki/Video/Script/MoveScriptTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Config::set(VideoConstants::SCRIPT_DISK_QUALIFIED, []); @@ -27,7 +27,7 @@ test('default', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -48,7 +48,7 @@ test('passed', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); test('moved in disk', function (): void { diff --git a/tests/Feature/Actions/Storage/Wiki/Video/Script/UploadScriptTest.php b/tests/Feature/Actions/Storage/Wiki/Video/Script/UploadScriptTest.php index b01990217..2e501246e 100644 --- a/tests/Feature/Actions/Storage/Wiki/Video/Script/UploadScriptTest.php +++ b/tests/Feature/Actions/Storage/Wiki/Video/Script/UploadScriptTest.php @@ -12,7 +12,7 @@ use Illuminate\Http\Testing\File; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Config::set(VideoConstants::SCRIPT_DISK_QUALIFIED, []); @@ -26,7 +26,7 @@ test('default', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -40,7 +40,7 @@ test('passed', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); test('uploaded to disk', function (): void { @@ -52,7 +52,7 @@ test('uploaded to disk', function (): void { $action->handle(); - $this->assertCount(1, $fs->allFiles()); + expect($fs->allFiles())->toHaveCount(1); }); test('created video', function (): void { @@ -82,5 +82,5 @@ test('attaches video', function (): void { $action->then($result); - $this->assertTrue($video->videoscript()->exists()); + expect($video->videoscript()->exists())->toBeTrue(); }); diff --git a/tests/Feature/Actions/Storage/Wiki/Video/UploadVideoTest.php b/tests/Feature/Actions/Storage/Wiki/Video/UploadVideoTest.php index 6727ca694..ccf230d4a 100644 --- a/tests/Feature/Actions/Storage/Wiki/Video/UploadVideoTest.php +++ b/tests/Feature/Actions/Storage/Wiki/Video/UploadVideoTest.php @@ -21,7 +21,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Config::set(VideoConstants::DISKS_QUALIFIED, []); @@ -35,7 +35,7 @@ test('default', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -50,7 +50,7 @@ test('passed', function (): void { $result = $storageResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); test('uploaded to disk', function (): void { @@ -63,7 +63,7 @@ test('uploaded to disk', function (): void { $action->handle(); - $this->assertCount(1, Storage::disk(Config::get(VideoConstants::DEFAULT_DISK_QUALIFIED))->allFiles()); + expect(Storage::disk(Config::get(VideoConstants::DEFAULT_DISK_QUALIFIED))->allFiles())->toHaveCount(1); }); test('created video', function (): void { @@ -184,7 +184,7 @@ test('associates script', function (): void { /** @var Video $video */ $video = Video::query()->first(); - $this->assertNotNull($video); + expect($video)->not->toBeNull(); $this->assertDatabaseHas(VideoScript::class, [VideoScript::ATTRIBUTE_VIDEO => $video->video_id]); }); diff --git a/tests/Feature/Console/Commands/Repositories/Storage/Admin/DumpReconcileTest.php b/tests/Feature/Console/Commands/Repositories/Storage/Admin/DumpReconcileTest.php index 731068d4f..99c25733b 100644 --- a/tests/Feature/Console/Commands/Repositories/Storage/Admin/DumpReconcileTest.php +++ b/tests/Feature/Console/Commands/Repositories/Storage/Admin/DumpReconcileTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Storage; use Mockery\MockInterface; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no results', function (): void { $this->mock(DumpRepository::class, function (MockInterface $mock): void { diff --git a/tests/Feature/Console/Commands/Repositories/Storage/Wiki/AudioReconcileTest.php b/tests/Feature/Console/Commands/Repositories/Storage/Wiki/AudioReconcileTest.php index 24bd9b9ea..c123d98ee 100644 --- a/tests/Feature/Console/Commands/Repositories/Storage/Wiki/AudioReconcileTest.php +++ b/tests/Feature/Console/Commands/Repositories/Storage/Wiki/AudioReconcileTest.php @@ -9,7 +9,7 @@ use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Collection; use Mockery\MockInterface; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no results', function (): void { $this->mock(AudioRepository::class, function (MockInterface $mock): void { diff --git a/tests/Feature/Console/Commands/Repositories/Storage/Wiki/Video/ScriptReconcileTest.php b/tests/Feature/Console/Commands/Repositories/Storage/Wiki/Video/ScriptReconcileTest.php index 8e1852dce..c48ff96fd 100644 --- a/tests/Feature/Console/Commands/Repositories/Storage/Wiki/Video/ScriptReconcileTest.php +++ b/tests/Feature/Console/Commands/Repositories/Storage/Wiki/Video/ScriptReconcileTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Storage; use Mockery\MockInterface; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no results', function (): void { Storage::fake(Config::get(VideoConstants::SCRIPT_DISK_QUALIFIED)); diff --git a/tests/Feature/Console/Commands/Repositories/Storage/Wiki/VideoReconcileTest.php b/tests/Feature/Console/Commands/Repositories/Storage/Wiki/VideoReconcileTest.php index a0d0c5a84..70ca9ad90 100644 --- a/tests/Feature/Console/Commands/Repositories/Storage/Wiki/VideoReconcileTest.php +++ b/tests/Feature/Console/Commands/Repositories/Storage/Wiki/VideoReconcileTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Storage; use Mockery\MockInterface; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no results', function (): void { Storage::fake(Config::get(VideoConstants::DEFAULT_DISK_QUALIFIED)); diff --git a/tests/Feature/Console/Commands/Storage/Admin/AdminDumpTest.php b/tests/Feature/Console/Commands/Storage/Admin/AdminDumpTest.php index d90925c5f..dd5333576 100644 --- a/tests/Feature/Console/Commands/Storage/Admin/AdminDumpTest.php +++ b/tests/Feature/Console/Commands/Storage/Admin/AdminDumpTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('database dump output', function (): void { Storage::fake('local'); @@ -30,6 +30,6 @@ test('database dump file', function (): void { $this->artisan(AdminDumpCommand::class)->run(); - $this->assertEmpty($local->allFiles()); - $this->assertCount(1, $fs->allFiles()); + expect($local->allFiles())->toBeEmpty(); + expect($fs->allFiles())->toHaveCount(1); }); diff --git a/tests/Feature/Console/Commands/Storage/Admin/AuthDumpTest.php b/tests/Feature/Console/Commands/Storage/Admin/AuthDumpTest.php index b4b9cc789..63d0f1563 100644 --- a/tests/Feature/Console/Commands/Storage/Admin/AuthDumpTest.php +++ b/tests/Feature/Console/Commands/Storage/Admin/AuthDumpTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('database dump output', function (): void { Storage::fake('local'); @@ -30,6 +30,6 @@ test('database dump file', function (): void { $this->artisan(AuthDumpCommand::class)->run(); - $this->assertEmpty($local->allFiles()); - $this->assertCount(1, $fs->allFiles()); + expect($local->allFiles())->toBeEmpty(); + expect($fs->allFiles())->toHaveCount(1); }); diff --git a/tests/Feature/Console/Commands/Storage/Admin/DocumentDumpTest.php b/tests/Feature/Console/Commands/Storage/Admin/DocumentDumpTest.php index 2ec23ea0f..99362fd75 100644 --- a/tests/Feature/Console/Commands/Storage/Admin/DocumentDumpTest.php +++ b/tests/Feature/Console/Commands/Storage/Admin/DocumentDumpTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('database dump output', function (): void { Storage::fake('local'); @@ -30,6 +30,6 @@ test('database dump file', function (): void { $this->artisan(DocumentDumpCommand::class)->run(); - $this->assertEmpty($local->allFiles()); - $this->assertCount(1, $fs->allFiles()); + expect($local->allFiles())->toBeEmpty(); + expect($fs->allFiles())->toHaveCount(1); }); diff --git a/tests/Feature/Console/Commands/Storage/Admin/DumpPruneTest.php b/tests/Feature/Console/Commands/Storage/Admin/DumpPruneTest.php index b1ecd773e..dc5487ae1 100644 --- a/tests/Feature/Console/Commands/Storage/Admin/DumpPruneTest.php +++ b/tests/Feature/Console/Commands/Storage/Admin/DumpPruneTest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no results', function (): void { Storage::fake(Config::get(DumpConstants::DISK_QUALIFIED)); diff --git a/tests/Feature/Console/Commands/Storage/Admin/ListDumpTest.php b/tests/Feature/Console/Commands/Storage/Admin/ListDumpTest.php index eb898efea..383542980 100644 --- a/tests/Feature/Console/Commands/Storage/Admin/ListDumpTest.php +++ b/tests/Feature/Console/Commands/Storage/Admin/ListDumpTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('database dump output', function (): void { Storage::fake('local'); @@ -30,6 +30,6 @@ test('database dump file', function (): void { $this->artisan(ListDumpCommand::class)->run(); - $this->assertEmpty($local->allFiles()); - $this->assertCount(1, $fs->allFiles()); + expect($local->allFiles())->toBeEmpty(); + expect($fs->allFiles())->toHaveCount(1); }); diff --git a/tests/Feature/Console/Commands/Storage/Admin/UserDumpTest.php b/tests/Feature/Console/Commands/Storage/Admin/UserDumpTest.php index d04d38a60..0c4670078 100644 --- a/tests/Feature/Console/Commands/Storage/Admin/UserDumpTest.php +++ b/tests/Feature/Console/Commands/Storage/Admin/UserDumpTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('database dump output', function (): void { Storage::fake('local'); @@ -30,6 +30,6 @@ test('database dump file', function (): void { $this->artisan(UserDumpCommand::class)->run(); - $this->assertEmpty($local->allFiles()); - $this->assertCount(1, $fs->allFiles()); + expect($local->allFiles())->toBeEmpty(); + expect($fs->allFiles())->toHaveCount(1); }); diff --git a/tests/Feature/Console/Commands/Storage/Admin/WikiDumpTest.php b/tests/Feature/Console/Commands/Storage/Admin/WikiDumpTest.php index 12f90679b..749f551f9 100644 --- a/tests/Feature/Console/Commands/Storage/Admin/WikiDumpTest.php +++ b/tests/Feature/Console/Commands/Storage/Admin/WikiDumpTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Date; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('database dump output', function (): void { Storage::fake(Config::get(DumpConstants::DISK_QUALIFIED)); @@ -29,6 +29,6 @@ test('database dump file', function (): void { $this->artisan(ContentDumpCommand::class)->run(); - $this->assertEmpty($local->allFiles()); - $this->assertCount(1, $fs->allFiles()); + expect($local->allFiles())->toBeEmpty(); + expect($fs->allFiles())->toHaveCount(1); }); diff --git a/tests/Feature/GraphQL/Mutations/Models/List/Playlist/DeletePlaylistMutationTest.php b/tests/Feature/GraphQL/Mutations/Models/List/Playlist/DeletePlaylistMutationTest.php index 3fdca5441..ce72d134a 100644 --- a/tests/Feature/GraphQL/Mutations/Models/List/Playlist/DeletePlaylistMutationTest.php +++ b/tests/Feature/GraphQL/Mutations/Models/List/Playlist/DeletePlaylistMutationTest.php @@ -120,5 +120,5 @@ it('deletes', function (): void { $this->assertDatabaseCount(Playlist::class, 0); $response->assertOk(); - $this->assertIsString($response->json('data.DeletePlaylist.message')); + expect($response->json('data.DeletePlaylist.message'))->toBeString(); }); diff --git a/tests/Feature/GraphQL/Mutations/Models/List/Playlist/Track/DeletePlaylistTrackMutationTest.php b/tests/Feature/GraphQL/Mutations/Models/List/Playlist/Track/DeletePlaylistTrackMutationTest.php index c0e214df0..9498583a5 100644 --- a/tests/Feature/GraphQL/Mutations/Models/List/Playlist/Track/DeletePlaylistTrackMutationTest.php +++ b/tests/Feature/GraphQL/Mutations/Models/List/Playlist/Track/DeletePlaylistTrackMutationTest.php @@ -136,5 +136,5 @@ it('deletes', function (): void { $this->assertDatabaseCount(PlaylistTrack::class, 0); $response->assertOk(); - $this->assertIsString($response->json('data.DeletePlaylistTrack.message')); + expect($response->json('data.DeletePlaylistTrack.message'))->toBeString(); }); diff --git a/tests/Feature/Http/Admin/DumpTest.php b/tests/Feature/Http/Admin/DumpTest.php index 333573af6..26fd9d7c7 100644 --- a/tests/Feature/Http/Admin/DumpTest.php +++ b/tests/Feature/Http/Admin/DumpTest.php @@ -17,7 +17,7 @@ use Laravel\Pennant\Feature; use function Pest\Laravel\actingAs; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('dump downloading not allowed forbidden', function (): void { Feature::deactivate(AllowDumpDownloading::class); diff --git a/tests/Feature/Http/Api/Admin/Announcement/AnnouncementIndexTest.php b/tests/Feature/Http/Api/Admin/Announcement/AnnouncementIndexTest.php index b7433c3ee..236fc39f6 100644 --- a/tests/Feature/Http/Api/Admin/Announcement/AnnouncementIndexTest.php +++ b/tests/Feature/Http/Api/Admin/Announcement/AnnouncementIndexTest.php @@ -25,9 +25,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $announcements = Announcement::factory()->count(fake()->randomDigitNotNull())->create(); diff --git a/tests/Feature/Http/Api/Admin/Announcement/AnnouncementShowTest.php b/tests/Feature/Http/Api/Admin/Announcement/AnnouncementShowTest.php index 23d4e443b..411a8db8f 100644 --- a/tests/Feature/Http/Api/Admin/Announcement/AnnouncementShowTest.php +++ b/tests/Feature/Http/Api/Admin/Announcement/AnnouncementShowTest.php @@ -12,7 +12,7 @@ use Illuminate\Foundation\Testing\WithFaker; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $announcement = Announcement::factory()->create(); diff --git a/tests/Feature/Http/Api/Admin/Feature/FeatureIndexTest.php b/tests/Feature/Http/Api/Admin/Feature/FeatureIndexTest.php index fbfa652bd..d8d223801 100644 --- a/tests/Feature/Http/Api/Admin/Feature/FeatureIndexTest.php +++ b/tests/Feature/Http/Api/Admin/Feature/FeatureIndexTest.php @@ -27,9 +27,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $features = Feature::factory()->count(fake()->randomDigitNotNull())->create(); diff --git a/tests/Feature/Http/Api/Admin/Feature/FeatureShowTest.php b/tests/Feature/Http/Api/Admin/Feature/FeatureShowTest.php index a941fac20..d6757a469 100644 --- a/tests/Feature/Http/Api/Admin/Feature/FeatureShowTest.php +++ b/tests/Feature/Http/Api/Admin/Feature/FeatureShowTest.php @@ -12,7 +12,7 @@ use Illuminate\Foundation\Testing\WithFaker; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $feature = Feature::factory()->create(); diff --git a/tests/Feature/Http/Api/Admin/FeaturedTheme/CurrentFeaturedThemeShowTest.php b/tests/Feature/Http/Api/Admin/FeaturedTheme/CurrentFeaturedThemeShowTest.php index c7908e50a..efeb9142e 100644 --- a/tests/Feature/Http/Api/Admin/FeaturedTheme/CurrentFeaturedThemeShowTest.php +++ b/tests/Feature/Http/Api/Admin/FeaturedTheme/CurrentFeaturedThemeShowTest.php @@ -23,7 +23,7 @@ use Illuminate\Support\Collection; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('not found if no featured themes', function (): void { $response = get(route('api.featuredtheme.current.show')); diff --git a/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeIndexTest.php b/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeIndexTest.php index 86e515523..7d1683937 100644 --- a/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeIndexTest.php +++ b/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeIndexTest.php @@ -36,9 +36,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $publicCount = fake()->randomDigitNotNull(); diff --git a/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeShowTest.php b/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeShowTest.php index 93406317c..d600b9fec 100644 --- a/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeShowTest.php +++ b/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeShowTest.php @@ -22,7 +22,7 @@ use Illuminate\Foundation\Testing\WithFaker; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('forbidden if future start date', function (): void { $featuredTheme = FeaturedTheme::factory()->create([ diff --git a/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeStoreTest.php b/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeStoreTest.php index 98585ccc7..f19e1693e 100644 --- a/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeStoreTest.php +++ b/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeStoreTest.php @@ -16,7 +16,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\post; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { $featuredTheme = FeaturedTheme::factory()->makeOne(); diff --git a/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeUpdateTest.php b/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeUpdateTest.php index f69f80450..68903f391 100644 --- a/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeUpdateTest.php +++ b/tests/Feature/Http/Api/Admin/FeaturedTheme/FeaturedThemeUpdateTest.php @@ -16,7 +16,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\put; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { $featuredTheme = FeaturedTheme::factory()->createOne(); diff --git a/tests/Feature/Http/Api/Auth/User/Me/List/ExternalProfile/MyExternalProfileIndexTest.php b/tests/Feature/Http/Api/Auth/User/Me/List/ExternalProfile/MyExternalProfileIndexTest.php index 7ea3879f8..46cfe8463 100644 --- a/tests/Feature/Http/Api/Auth/User/Me/List/ExternalProfile/MyExternalProfileIndexTest.php +++ b/tests/Feature/Http/Api/Auth/User/Me/List/ExternalProfile/MyExternalProfileIndexTest.php @@ -12,7 +12,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { $response = get(route('api.me.externalprofile.index')); diff --git a/tests/Feature/Http/Api/Auth/User/Me/List/Playlist/MyPlaylistIndexTest.php b/tests/Feature/Http/Api/Auth/User/Me/List/Playlist/MyPlaylistIndexTest.php index 9489fd209..1f681208f 100644 --- a/tests/Feature/Http/Api/Auth/User/Me/List/Playlist/MyPlaylistIndexTest.php +++ b/tests/Feature/Http/Api/Auth/User/Me/List/Playlist/MyPlaylistIndexTest.php @@ -12,7 +12,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { $response = get(route('api.me.playlist.index')); diff --git a/tests/Feature/Http/Api/Auth/User/Me/MyShowTest.php b/tests/Feature/Http/Api/Auth/User/Me/MyShowTest.php index ed8399d14..ed2b063fa 100644 --- a/tests/Feature/Http/Api/Auth/User/Me/MyShowTest.php +++ b/tests/Feature/Http/Api/Auth/User/Me/MyShowTest.php @@ -10,7 +10,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { $response = get(route('api.me.show')); diff --git a/tests/Feature/Http/Api/Auth/User/Me/Notification/MyNotificationIndexTest.php b/tests/Feature/Http/Api/Auth/User/Me/Notification/MyNotificationIndexTest.php index c98f89550..d97ef6354 100644 --- a/tests/Feature/Http/Api/Auth/User/Me/Notification/MyNotificationIndexTest.php +++ b/tests/Feature/Http/Api/Auth/User/Me/Notification/MyNotificationIndexTest.php @@ -13,7 +13,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { $response = get(route('api.me.notification.index')); diff --git a/tests/Feature/Http/Api/Document/Page/PageIndexTest.php b/tests/Feature/Http/Api/Document/Page/PageIndexTest.php index b635a82d6..71ac1d10d 100644 --- a/tests/Feature/Http/Api/Document/Page/PageIndexTest.php +++ b/tests/Feature/Http/Api/Document/Page/PageIndexTest.php @@ -28,9 +28,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $pages = Page::factory()->count(fake()->randomDigitNotNull())->create(); diff --git a/tests/Feature/Http/Api/Document/Page/PageShowTest.php b/tests/Feature/Http/Api/Document/Page/PageShowTest.php index 1b920845b..84b95be26 100644 --- a/tests/Feature/Http/Api/Document/Page/PageShowTest.php +++ b/tests/Feature/Http/Api/Document/Page/PageShowTest.php @@ -12,7 +12,7 @@ use Illuminate\Foundation\Testing\WithFaker; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $page = Page::factory()->create(); diff --git a/tests/Feature/Http/Api/List/External/Entry/ExternalEntryIndexTest.php b/tests/Feature/Http/Api/List/External/Entry/ExternalEntryIndexTest.php index 0de69245f..d89a48f9c 100644 --- a/tests/Feature/Http/Api/List/External/Entry/ExternalEntryIndexTest.php +++ b/tests/Feature/Http/Api/List/External/Entry/ExternalEntryIndexTest.php @@ -36,9 +36,9 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); /** * Setup the test environment. diff --git a/tests/Feature/Http/Api/List/External/Entry/ExternalEntryShowTest.php b/tests/Feature/Http/Api/List/External/Entry/ExternalEntryShowTest.php index acf0d2f26..6801fc41b 100644 --- a/tests/Feature/Http/Api/List/External/Entry/ExternalEntryShowTest.php +++ b/tests/Feature/Http/Api/List/External/Entry/ExternalEntryShowTest.php @@ -22,7 +22,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); /** * Setup the test environment. diff --git a/tests/Feature/Http/Api/List/External/ExternalProfileDestroyTest.php b/tests/Feature/Http/Api/List/External/ExternalProfileDestroyTest.php index a0e6e66db..ab684462b 100644 --- a/tests/Feature/Http/Api/List/External/ExternalProfileDestroyTest.php +++ b/tests/Feature/Http/Api/List/External/ExternalProfileDestroyTest.php @@ -15,7 +15,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\delete; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { Event::fakeExcept(ExternalProfileCreated::class); diff --git a/tests/Feature/Http/Api/List/External/ExternalProfileIndexTest.php b/tests/Feature/Http/Api/List/External/ExternalProfileIndexTest.php index f2e29fa9d..cced98e98 100644 --- a/tests/Feature/Http/Api/List/External/ExternalProfileIndexTest.php +++ b/tests/Feature/Http/Api/List/External/ExternalProfileIndexTest.php @@ -31,11 +31,11 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(AggregatesFields::class); +pest()->use(AggregatesFields::class); -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $publicCount = fake()->randomDigitNotNull(); diff --git a/tests/Feature/Http/Api/List/External/ExternalProfileShowTest.php b/tests/Feature/Http/Api/List/External/ExternalProfileShowTest.php index e845957a6..bf73fd808 100644 --- a/tests/Feature/Http/Api/List/External/ExternalProfileShowTest.php +++ b/tests/Feature/Http/Api/List/External/ExternalProfileShowTest.php @@ -21,7 +21,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('private external profile cannot be publicly viewed', function (): void { Event::fakeExcept(ExternalProfileCreated::class); diff --git a/tests/Feature/Http/Api/List/External/ExternalProfileStoreTest.php b/tests/Feature/Http/Api/List/External/ExternalProfileStoreTest.php index 972805941..d62fc016a 100644 --- a/tests/Feature/Http/Api/List/External/ExternalProfileStoreTest.php +++ b/tests/Feature/Http/Api/List/External/ExternalProfileStoreTest.php @@ -20,7 +20,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\post; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { Feature::activate(AllowExternalProfileManagement::class); diff --git a/tests/Feature/Http/Api/List/External/ExternalProfileUpdateTest.php b/tests/Feature/Http/Api/List/External/ExternalProfileUpdateTest.php index 9bc9aa613..f664a431f 100644 --- a/tests/Feature/Http/Api/List/External/ExternalProfileUpdateTest.php +++ b/tests/Feature/Http/Api/List/External/ExternalProfileUpdateTest.php @@ -17,7 +17,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\put; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { Event::fakeExcept(ExternalProfileCreated::class); diff --git a/tests/Feature/Http/Api/List/Playlist/PlaylistBackwardIndexTest.php b/tests/Feature/Http/Api/List/Playlist/PlaylistBackwardIndexTest.php index 05be896ca..12b145c25 100644 --- a/tests/Feature/Http/Api/List/Playlist/PlaylistBackwardIndexTest.php +++ b/tests/Feature/Http/Api/List/Playlist/PlaylistBackwardIndexTest.php @@ -33,7 +33,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('private playlist cannot be publicly viewed', function (): void { Event::fakeExcept(PlaylistCreated::class); diff --git a/tests/Feature/Http/Api/List/Playlist/PlaylistDestroyTest.php b/tests/Feature/Http/Api/List/Playlist/PlaylistDestroyTest.php index 7a0806cc1..20b51b0cc 100644 --- a/tests/Feature/Http/Api/List/Playlist/PlaylistDestroyTest.php +++ b/tests/Feature/Http/Api/List/Playlist/PlaylistDestroyTest.php @@ -15,7 +15,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\delete; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { Event::fakeExcept(PlaylistCreated::class); diff --git a/tests/Feature/Http/Api/List/Playlist/PlaylistForwardIndexTest.php b/tests/Feature/Http/Api/List/Playlist/PlaylistForwardIndexTest.php index e24155ae5..3378597e7 100644 --- a/tests/Feature/Http/Api/List/Playlist/PlaylistForwardIndexTest.php +++ b/tests/Feature/Http/Api/List/Playlist/PlaylistForwardIndexTest.php @@ -33,7 +33,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('private playlist cannot be publicly viewed', function (): void { Event::fakeExcept(PlaylistCreated::class); diff --git a/tests/Feature/Http/Api/List/Playlist/PlaylistIndexTest.php b/tests/Feature/Http/Api/List/Playlist/PlaylistIndexTest.php index 3087ce5c6..34234c333 100644 --- a/tests/Feature/Http/Api/List/Playlist/PlaylistIndexTest.php +++ b/tests/Feature/Http/Api/List/Playlist/PlaylistIndexTest.php @@ -34,11 +34,11 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(AggregatesFields::class); +pest()->use(AggregatesFields::class); -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $publicCount = fake()->randomDigitNotNull(); diff --git a/tests/Feature/Http/Api/List/Playlist/PlaylistShowTest.php b/tests/Feature/Http/Api/List/Playlist/PlaylistShowTest.php index 5f49a6c4c..99cc13591 100644 --- a/tests/Feature/Http/Api/List/Playlist/PlaylistShowTest.php +++ b/tests/Feature/Http/Api/List/Playlist/PlaylistShowTest.php @@ -26,7 +26,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('private playlist cannot be publicly viewed', function (): void { Event::fakeExcept(PlaylistCreated::class); diff --git a/tests/Feature/Http/Api/List/Playlist/PlaylistStoreTest.php b/tests/Feature/Http/Api/List/Playlist/PlaylistStoreTest.php index 88d33aab9..b3100b0e7 100644 --- a/tests/Feature/Http/Api/List/Playlist/PlaylistStoreTest.php +++ b/tests/Feature/Http/Api/List/Playlist/PlaylistStoreTest.php @@ -17,7 +17,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\post; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { Feature::activate(AllowPlaylistManagement::class); diff --git a/tests/Feature/Http/Api/List/Playlist/PlaylistUpdateTest.php b/tests/Feature/Http/Api/List/Playlist/PlaylistUpdateTest.php index 98438d799..7756b91a0 100644 --- a/tests/Feature/Http/Api/List/Playlist/PlaylistUpdateTest.php +++ b/tests/Feature/Http/Api/List/Playlist/PlaylistUpdateTest.php @@ -17,7 +17,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\put; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { Event::fakeExcept(PlaylistCreated::class); diff --git a/tests/Feature/Http/Api/List/Playlist/Track/TrackBackwardIndexTest.php b/tests/Feature/Http/Api/List/Playlist/Track/TrackBackwardIndexTest.php index e74b62356..4f25e70b9 100644 --- a/tests/Feature/Http/Api/List/Playlist/Track/TrackBackwardIndexTest.php +++ b/tests/Feature/Http/Api/List/Playlist/Track/TrackBackwardIndexTest.php @@ -34,7 +34,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('private playlist cannot be publicly viewed', function (): void { Event::fakeExcept([PlaylistCreated::class, TrackCreated::class]); diff --git a/tests/Feature/Http/Api/List/Playlist/Track/TrackDestroyTest.php b/tests/Feature/Http/Api/List/Playlist/Track/TrackDestroyTest.php index 88038b528..f9063cf08 100644 --- a/tests/Feature/Http/Api/List/Playlist/Track/TrackDestroyTest.php +++ b/tests/Feature/Http/Api/List/Playlist/Track/TrackDestroyTest.php @@ -18,7 +18,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\delete; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { Event::fakeExcept([PlaylistCreated::class, TrackCreated::class]); @@ -141,8 +141,8 @@ test('deleted', function (): void { $playlist->refresh(); $this->assertModelMissing($track); - $this->assertTrue($playlist->first()->doesntExist()); - $this->assertTrue($playlist->last()->doesntExist()); + expect($playlist->first()->doesntExist())->toBeTrue(); + expect($playlist->last()->doesntExist())->toBeTrue(); }); test('destroy permitted for bypass', function (): void { @@ -197,8 +197,8 @@ test('destroy first', function (): void { $second->refresh(); $this->assertModelMissing($first); - $this->assertTrue($playlist->first()->is($second)); - $this->assertTrue($second->previous()->doesntExist()); + expect($playlist->first()->is($second))->toBeTrue(); + expect($second->previous()->doesntExist())->toBeTrue(); }); test('destroy last', function (): void { @@ -226,8 +226,8 @@ test('destroy last', function (): void { $previous->refresh(); $this->assertModelMissing($last); - $this->assertTrue($playlist->last()->is($previous)); - $this->assertTrue($previous->next()->doesntExist()); + expect($playlist->last()->is($previous))->toBeTrue(); + expect($previous->next()->doesntExist())->toBeTrue(); }); test('destroy second', function (): void { @@ -258,12 +258,12 @@ test('destroy second', function (): void { $this->assertModelMissing($second); - $this->assertTrue($playlist->first()->is($first)); - $this->assertTrue($playlist->last()->is($third)); + expect($playlist->first()->is($first))->toBeTrue(); + expect($playlist->last()->is($third))->toBeTrue(); - $this->assertTrue($first->previous()->doesntExist()); - $this->assertTrue($first->next()->is($third)); + expect($first->previous()->doesntExist())->toBeTrue(); + expect($first->next()->is($third))->toBeTrue(); - $this->assertTrue($third->previous()->is($first)); - $this->assertTrue($third->next()->doesntExist()); + expect($third->previous()->is($first))->toBeTrue(); + expect($third->next()->doesntExist())->toBeTrue(); }); diff --git a/tests/Feature/Http/Api/List/Playlist/Track/TrackForwardIndexTest.php b/tests/Feature/Http/Api/List/Playlist/Track/TrackForwardIndexTest.php index a6896e1cc..eb9e3cc3a 100644 --- a/tests/Feature/Http/Api/List/Playlist/Track/TrackForwardIndexTest.php +++ b/tests/Feature/Http/Api/List/Playlist/Track/TrackForwardIndexTest.php @@ -34,7 +34,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('private playlist cannot be publicly viewed', function (): void { Event::fakeExcept([PlaylistCreated::class, TrackCreated::class]); diff --git a/tests/Feature/Http/Api/List/Playlist/Track/TrackIndexTest.php b/tests/Feature/Http/Api/List/Playlist/Track/TrackIndexTest.php index 086b745db..466d36c66 100644 --- a/tests/Feature/Http/Api/List/Playlist/Track/TrackIndexTest.php +++ b/tests/Feature/Http/Api/List/Playlist/Track/TrackIndexTest.php @@ -36,9 +36,9 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('private playlist track cannot be publicly viewed', function (): void { Event::fakeExcept(PlaylistCreated::class); diff --git a/tests/Feature/Http/Api/List/Playlist/Track/TrackShowTest.php b/tests/Feature/Http/Api/List/Playlist/Track/TrackShowTest.php index 05dd5da8e..d65df071f 100644 --- a/tests/Feature/Http/Api/List/Playlist/Track/TrackShowTest.php +++ b/tests/Feature/Http/Api/List/Playlist/Track/TrackShowTest.php @@ -23,7 +23,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('private playlist track cannot be publicly viewed', function (): void { Event::fakeExcept([PlaylistCreated::class, TrackCreated::class]); diff --git a/tests/Feature/Http/Api/List/Playlist/Track/TrackStoreTest.php b/tests/Feature/Http/Api/List/Playlist/Track/TrackStoreTest.php index b36aa19f5..78c64ee44 100644 --- a/tests/Feature/Http/Api/List/Playlist/Track/TrackStoreTest.php +++ b/tests/Feature/Http/Api/List/Playlist/Track/TrackStoreTest.php @@ -24,7 +24,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\post; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { Event::fakeExcept(PlaylistCreated::class); @@ -367,8 +367,8 @@ test('create', function (): void { $this->assertDatabaseCount(PlaylistTrack::class, 1); - $this->assertTrue($playlist->first()->is($track)); - $this->assertTrue($playlist->last()->is($track)); + expect($playlist->first()->is($track))->toBeTrue(); + expect($playlist->last()->is($track))->toBeTrue(); }); test('create after last track', function (): void { @@ -413,12 +413,12 @@ test('create after last track', function (): void { $this->assertDatabaseCount(PlaylistTrack::class, $trackCount + 1); - $this->assertTrue($playlist->last()->is($track)); + expect($playlist->last()->is($track))->toBeTrue(); - $this->assertTrue($last->next()->is($track)); + expect($last->next()->is($track))->toBeTrue(); - $this->assertTrue($track->previous()->is($last)); - $this->assertTrue($track->next()->doesntExist()); + expect($track->previous()->is($last))->toBeTrue(); + expect($track->next()->doesntExist())->toBeTrue(); }); test('create after first track', function (): void { @@ -464,12 +464,12 @@ test('create after first track', function (): void { $this->assertDatabaseCount(PlaylistTrack::class, $trackCount + 1); - $this->assertTrue($playlist->first()->is($first)); + expect($playlist->first()->is($first))->toBeTrue(); - $this->assertTrue($first->next()->is($track)); + expect($first->next()->is($track))->toBeTrue(); - $this->assertTrue($track->previous()->is($first)); - $this->assertTrue($track->next()->is($next)); + expect($track->previous()->is($first))->toBeTrue(); + expect($track->next()->is($next))->toBeTrue(); }); test('create before last track', function (): void { @@ -515,12 +515,12 @@ test('create before last track', function (): void { $this->assertDatabaseCount(PlaylistTrack::class, $trackCount + 1); - $this->assertTrue($playlist->last()->is($last)); + expect($playlist->last()->is($last))->toBeTrue(); - $this->assertTrue($last->previous()->is($track)); + expect($last->previous()->is($track))->toBeTrue(); - $this->assertTrue($track->previous()->is($previous)); - $this->assertTrue($track->next()->is($last)); + expect($track->previous()->is($previous))->toBeTrue(); + expect($track->next()->is($last))->toBeTrue(); }); test('create before first track', function (): void { @@ -565,10 +565,10 @@ test('create before first track', function (): void { $this->assertDatabaseCount(PlaylistTrack::class, $trackCount + 1); - $this->assertTrue($playlist->first()->is($track)); + expect($playlist->first()->is($track))->toBeTrue(); - $this->assertTrue($track->previous()->doesntExist()); - $this->assertTrue($track->next()->is($first)); + expect($track->previous()->doesntExist())->toBeTrue(); + expect($track->next()->is($first))->toBeTrue(); }); test('create permitted for bypass', function (): void { diff --git a/tests/Feature/Http/Api/List/Playlist/Track/TrackUpdateTest.php b/tests/Feature/Http/Api/List/Playlist/Track/TrackUpdateTest.php index b114eb804..aa9c4722c 100644 --- a/tests/Feature/Http/Api/List/Playlist/Track/TrackUpdateTest.php +++ b/tests/Feature/Http/Api/List/Playlist/Track/TrackUpdateTest.php @@ -19,7 +19,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\put; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { Event::fakeExcept([PlaylistCreated::class, TrackCreated::class]); @@ -391,17 +391,17 @@ test('insert first after second', function (): void { $second->refresh(); $third->refresh(); - $this->assertTrue($playlist->first()->is($second)); - $this->assertTrue($playlist->last()->is($third)); + expect($playlist->first()->is($second))->toBeTrue(); + expect($playlist->last()->is($third))->toBeTrue(); - $this->assertTrue($first->previous()->is($second)); - $this->assertTrue($first->next()->is($third)); + expect($first->previous()->is($second))->toBeTrue(); + expect($first->next()->is($third))->toBeTrue(); - $this->assertTrue($second->previous()->doesntExist()); - $this->assertTrue($second->next()->is($first)); + expect($second->previous()->doesntExist())->toBeTrue(); + expect($second->next()->is($first))->toBeTrue(); - $this->assertTrue($third->previous()->is($first)); - $this->assertTrue($third->next()->doesntExist()); + expect($third->previous()->is($first))->toBeTrue(); + expect($third->next()->doesntExist())->toBeTrue(); }); test('insert first after third', function (): void { @@ -435,17 +435,17 @@ test('insert first after third', function (): void { $second->refresh(); $third->refresh(); - $this->assertTrue($playlist->first()->is($second)); - $this->assertTrue($playlist->last()->is($first)); + expect($playlist->first()->is($second))->toBeTrue(); + expect($playlist->last()->is($first))->toBeTrue(); - $this->assertTrue($first->previous()->is($third)); - $this->assertTrue($first->next()->doesntExist()); + expect($first->previous()->is($third))->toBeTrue(); + expect($first->next()->doesntExist())->toBeTrue(); - $this->assertTrue($second->previous()->doesntExist()); - $this->assertTrue($second->next()->is($third)); + expect($second->previous()->doesntExist())->toBeTrue(); + expect($second->next()->is($third))->toBeTrue(); - $this->assertTrue($third->previous()->is($second)); - $this->assertTrue($third->next()->is($first)); + expect($third->previous()->is($second))->toBeTrue(); + expect($third->next()->is($first))->toBeTrue(); }); test('insert first before third', function (): void { @@ -479,17 +479,17 @@ test('insert first before third', function (): void { $second->refresh(); $third->refresh(); - $this->assertTrue($playlist->first()->is($second)); - $this->assertTrue($playlist->last()->is($third)); + expect($playlist->first()->is($second))->toBeTrue(); + expect($playlist->last()->is($third))->toBeTrue(); - $this->assertTrue($first->previous()->is($second)); - $this->assertTrue($first->next()->is($third)); + expect($first->previous()->is($second))->toBeTrue(); + expect($first->next()->is($third))->toBeTrue(); - $this->assertTrue($second->previous()->doesntExist()); - $this->assertTrue($second->next()->is($first)); + expect($second->previous()->doesntExist())->toBeTrue(); + expect($second->next()->is($first))->toBeTrue(); - $this->assertTrue($third->previous()->is($first)); - $this->assertTrue($third->next()->doesntExist()); + expect($third->previous()->is($first))->toBeTrue(); + expect($third->next()->doesntExist())->toBeTrue(); }); test('insert second after third', function (): void { @@ -523,17 +523,17 @@ test('insert second after third', function (): void { $second->refresh(); $third->refresh(); - $this->assertTrue($playlist->first()->is($first)); - $this->assertTrue($playlist->last()->is($second)); + expect($playlist->first()->is($first))->toBeTrue(); + expect($playlist->last()->is($second))->toBeTrue(); - $this->assertTrue($first->previous()->doesntExist()); - $this->assertTrue($first->next()->is($third)); + expect($first->previous()->doesntExist())->toBeTrue(); + expect($first->next()->is($third))->toBeTrue(); - $this->assertTrue($second->previous()->is($third)); - $this->assertTrue($second->next()->doesntExist()); + expect($second->previous()->is($third))->toBeTrue(); + expect($second->next()->doesntExist())->toBeTrue(); - $this->assertTrue($third->previous()->is($first)); - $this->assertTrue($third->next()->is($second)); + expect($third->previous()->is($first))->toBeTrue(); + expect($third->next()->is($second))->toBeTrue(); }); test('insert second before first', function (): void { @@ -567,17 +567,17 @@ test('insert second before first', function (): void { $second->refresh(); $third->refresh(); - $this->assertTrue($playlist->first()->is($second)); - $this->assertTrue($playlist->last()->is($third)); + expect($playlist->first()->is($second))->toBeTrue(); + expect($playlist->last()->is($third))->toBeTrue(); - $this->assertTrue($first->previous()->is($second)); - $this->assertTrue($first->next()->is($third)); + expect($first->previous()->is($second))->toBeTrue(); + expect($first->next()->is($third))->toBeTrue(); - $this->assertTrue($second->previous()->doesntExist()); - $this->assertTrue($second->next()->is($first)); + expect($second->previous()->doesntExist())->toBeTrue(); + expect($second->next()->is($first))->toBeTrue(); - $this->assertTrue($third->previous()->is($first)); - $this->assertTrue($third->next()->doesntExist()); + expect($third->previous()->is($first))->toBeTrue(); + expect($third->next()->doesntExist())->toBeTrue(); }); test('insert third after first', function (): void { @@ -611,17 +611,17 @@ test('insert third after first', function (): void { $second->refresh(); $third->refresh(); - $this->assertTrue($playlist->first()->is($first)); - $this->assertTrue($playlist->last()->is($second)); + expect($playlist->first()->is($first))->toBeTrue(); + expect($playlist->last()->is($second))->toBeTrue(); - $this->assertTrue($first->previous()->doesntExist()); - $this->assertTrue($first->next()->is($third)); + expect($first->previous()->doesntExist())->toBeTrue(); + expect($first->next()->is($third))->toBeTrue(); - $this->assertTrue($second->previous()->is($third)); - $this->assertTrue($second->next()->doesntExist()); + expect($second->previous()->is($third))->toBeTrue(); + expect($second->next()->doesntExist())->toBeTrue(); - $this->assertTrue($third->previous()->is($first)); - $this->assertTrue($third->next()->is($second)); + expect($third->previous()->is($first))->toBeTrue(); + expect($third->next()->is($second))->toBeTrue(); }); test('insert third before second', function (): void { @@ -655,17 +655,17 @@ test('insert third before second', function (): void { $second->refresh(); $third->refresh(); - $this->assertTrue($playlist->first()->is($first)); - $this->assertTrue($playlist->last()->is($second)); + expect($playlist->first()->is($first))->toBeTrue(); + expect($playlist->last()->is($second))->toBeTrue(); - $this->assertTrue($first->previous()->doesntExist()); - $this->assertTrue($first->next()->is($third)); + expect($first->previous()->doesntExist())->toBeTrue(); + expect($first->next()->is($third))->toBeTrue(); - $this->assertTrue($second->previous()->is($third)); - $this->assertTrue($second->next()->doesntExist()); + expect($second->previous()->is($third))->toBeTrue(); + expect($second->next()->doesntExist())->toBeTrue(); - $this->assertTrue($third->previous()->is($first)); - $this->assertTrue($third->next()->is($second)); + expect($third->previous()->is($first))->toBeTrue(); + expect($third->next()->is($second))->toBeTrue(); }); test('insert third before first', function (): void { @@ -699,17 +699,17 @@ test('insert third before first', function (): void { $second->refresh(); $third->refresh(); - $this->assertTrue($playlist->first()->is($third)); - $this->assertTrue($playlist->last()->is($second)); + expect($playlist->first()->is($third))->toBeTrue(); + expect($playlist->last()->is($second))->toBeTrue(); - $this->assertTrue($first->previous()->is($third)); - $this->assertTrue($first->next()->is($second)); + expect($first->previous()->is($third))->toBeTrue(); + expect($first->next()->is($second))->toBeTrue(); - $this->assertTrue($second->previous()->is($first)); - $this->assertTrue($second->next()->doesntExist()); + expect($second->previous()->is($first))->toBeTrue(); + expect($second->next()->doesntExist())->toBeTrue(); - $this->assertTrue($third->previous()->doesntExist()); - $this->assertTrue($third->next()->is($first)); + expect($third->previous()->doesntExist())->toBeTrue(); + expect($third->next()->is($first))->toBeTrue(); }); test('update permitted for bypass', function (): void { diff --git a/tests/Feature/Http/Api/Pivot/Wiki/AnimeSeries/AnimeSeriesIndexTest.php b/tests/Feature/Http/Api/Pivot/Wiki/AnimeSeries/AnimeSeriesIndexTest.php index 0bcea43e8..eebfd0caf 100644 --- a/tests/Feature/Http/Api/Pivot/Wiki/AnimeSeries/AnimeSeriesIndexTest.php +++ b/tests/Feature/Http/Api/Pivot/Wiki/AnimeSeries/AnimeSeriesIndexTest.php @@ -33,9 +33,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Collection::times(fake()->randomDigitNotNull(), function (): void { diff --git a/tests/Feature/Http/Api/Pivot/Wiki/AnimeSeries/AnimeSeriesShowTest.php b/tests/Feature/Http/Api/Pivot/Wiki/AnimeSeries/AnimeSeriesShowTest.php index 1d0e31ed1..619882780 100644 --- a/tests/Feature/Http/Api/Pivot/Wiki/AnimeSeries/AnimeSeriesShowTest.php +++ b/tests/Feature/Http/Api/Pivot/Wiki/AnimeSeries/AnimeSeriesShowTest.php @@ -21,7 +21,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('not found', function (): void { $anime = Anime::factory()->createOne(); diff --git a/tests/Feature/Http/Api/Pivot/Wiki/AnimeStudio/AnimeStudioIndexTest.php b/tests/Feature/Http/Api/Pivot/Wiki/AnimeStudio/AnimeStudioIndexTest.php index 75964f9a3..982a4900e 100644 --- a/tests/Feature/Http/Api/Pivot/Wiki/AnimeStudio/AnimeStudioIndexTest.php +++ b/tests/Feature/Http/Api/Pivot/Wiki/AnimeStudio/AnimeStudioIndexTest.php @@ -33,9 +33,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Collection::times(fake()->randomDigitNotNull(), function (): void { diff --git a/tests/Feature/Http/Api/Pivot/Wiki/AnimeStudio/AnimeStudioShowTest.php b/tests/Feature/Http/Api/Pivot/Wiki/AnimeStudio/AnimeStudioShowTest.php index 2d22fa5ca..3157b1bbc 100644 --- a/tests/Feature/Http/Api/Pivot/Wiki/AnimeStudio/AnimeStudioShowTest.php +++ b/tests/Feature/Http/Api/Pivot/Wiki/AnimeStudio/AnimeStudioShowTest.php @@ -21,7 +21,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('not found', function (): void { $anime = Anime::factory()->createOne(); diff --git a/tests/Feature/Http/Api/Pivot/Wiki/ArtistMember/ArtistMemberIndexTest.php b/tests/Feature/Http/Api/Pivot/Wiki/ArtistMember/ArtistMemberIndexTest.php index 9487f6613..36457aa90 100644 --- a/tests/Feature/Http/Api/Pivot/Wiki/ArtistMember/ArtistMemberIndexTest.php +++ b/tests/Feature/Http/Api/Pivot/Wiki/ArtistMember/ArtistMemberIndexTest.php @@ -29,9 +29,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Collection::times(fake()->randomDigitNotNull(), function (): void { diff --git a/tests/Feature/Http/Api/Pivot/Wiki/ArtistMember/ArtistMemberShowTest.php b/tests/Feature/Http/Api/Pivot/Wiki/ArtistMember/ArtistMemberShowTest.php index f449c97de..c67dd204f 100644 --- a/tests/Feature/Http/Api/Pivot/Wiki/ArtistMember/ArtistMemberShowTest.php +++ b/tests/Feature/Http/Api/Pivot/Wiki/ArtistMember/ArtistMemberShowTest.php @@ -15,7 +15,7 @@ use Illuminate\Foundation\Testing\WithFaker; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('not found', function (): void { $artist = Artist::factory()->createOne(); diff --git a/tests/Feature/Http/Api/Pivot/Wiki/EntryVideo/EntryVideoIndexTest.php b/tests/Feature/Http/Api/Pivot/Wiki/EntryVideo/EntryVideoIndexTest.php index c306d237a..caee802aa 100644 --- a/tests/Feature/Http/Api/Pivot/Wiki/EntryVideo/EntryVideoIndexTest.php +++ b/tests/Feature/Http/Api/Pivot/Wiki/EntryVideo/EntryVideoIndexTest.php @@ -35,9 +35,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Collection::times(fake()->randomDigitNotNull(), function (): void { diff --git a/tests/Feature/Http/Api/Pivot/Wiki/EntryVideo/EntryVideoShowTest.php b/tests/Feature/Http/Api/Pivot/Wiki/EntryVideo/EntryVideoShowTest.php index bb5327055..73cb7625e 100644 --- a/tests/Feature/Http/Api/Pivot/Wiki/EntryVideo/EntryVideoShowTest.php +++ b/tests/Feature/Http/Api/Pivot/Wiki/EntryVideo/EntryVideoShowTest.php @@ -23,7 +23,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('not found', function (): void { $entry = Entry::factory() diff --git a/tests/Feature/Http/Api/SearchTest.php b/tests/Feature/Http/Api/SearchTest.php index 5effa3943..19a90a630 100644 --- a/tests/Feature/Http/Api/SearchTest.php +++ b/tests/Feature/Http/Api/SearchTest.php @@ -19,7 +19,7 @@ use Illuminate\Support\Facades\Config; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no search term', function (): void { $response = get(route('api.search.show')); diff --git a/tests/Feature/Http/Api/Wiki/Anime/AnimeIndexTest.php b/tests/Feature/Http/Api/Wiki/Anime/AnimeIndexTest.php index 021c3ada4..81691c6f0 100644 --- a/tests/Feature/Http/Api/Wiki/Anime/AnimeIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Anime/AnimeIndexTest.php @@ -46,9 +46,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $anime = Anime::factory()->count(fake()->numberBetween(1, 3))->create(); diff --git a/tests/Feature/Http/Api/Wiki/Anime/AnimeShowTest.php b/tests/Feature/Http/Api/Wiki/Anime/AnimeShowTest.php index 22624b0f7..35c77ca38 100644 --- a/tests/Feature/Http/Api/Wiki/Anime/AnimeShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Anime/AnimeShowTest.php @@ -30,7 +30,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $anime = Anime::factory()->create(); diff --git a/tests/Feature/Http/Api/Wiki/Anime/YearIndexTest.php b/tests/Feature/Http/Api/Wiki/Anime/YearIndexTest.php index 8c064b198..c4fa8fa40 100644 --- a/tests/Feature/Http/Api/Wiki/Anime/YearIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Anime/YearIndexTest.php @@ -7,7 +7,7 @@ use Illuminate\Foundation\Testing\WithFaker; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $anime = Anime::factory() diff --git a/tests/Feature/Http/Api/Wiki/Anime/YearShowTest.php b/tests/Feature/Http/Api/Wiki/Anime/YearShowTest.php index 3f028bab9..bd8afd40d 100644 --- a/tests/Feature/Http/Api/Wiki/Anime/YearShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Anime/YearShowTest.php @@ -17,7 +17,7 @@ use Illuminate\Support\Str; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $year = intval(fake()->year()); diff --git a/tests/Feature/Http/Api/Wiki/Artist/ArtistIndexTest.php b/tests/Feature/Http/Api/Wiki/Artist/ArtistIndexTest.php index ab144ea73..461f7891f 100644 --- a/tests/Feature/Http/Api/Wiki/Artist/ArtistIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Artist/ArtistIndexTest.php @@ -44,9 +44,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $artists = Artist::factory()->count(fake()->randomDigitNotNull())->create(); diff --git a/tests/Feature/Http/Api/Wiki/Artist/ArtistShowTest.php b/tests/Feature/Http/Api/Wiki/Artist/ArtistShowTest.php index 7b480d31c..160d01419 100644 --- a/tests/Feature/Http/Api/Wiki/Artist/ArtistShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Artist/ArtistShowTest.php @@ -30,7 +30,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $artist = Artist::factory()->create(); diff --git a/tests/Feature/Http/Api/Wiki/Audio/AudioIndexTest.php b/tests/Feature/Http/Api/Wiki/Audio/AudioIndexTest.php index d8e5a7841..36011c5af 100644 --- a/tests/Feature/Http/Api/Wiki/Audio/AudioIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Audio/AudioIndexTest.php @@ -31,9 +31,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $audios = Audio::factory() diff --git a/tests/Feature/Http/Api/Wiki/Audio/AudioShowTest.php b/tests/Feature/Http/Api/Wiki/Audio/AudioShowTest.php index e12041b73..ac49e0d4d 100644 --- a/tests/Feature/Http/Api/Wiki/Audio/AudioShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Audio/AudioShowTest.php @@ -15,7 +15,7 @@ use Illuminate\Foundation\Testing\WithFaker; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $audio = Audio::factory()->create(); diff --git a/tests/Feature/Http/Api/Wiki/Entry/EntryIndexTest.php b/tests/Feature/Http/Api/Wiki/Entry/EntryIndexTest.php index 883161979..1f760dfdd 100644 --- a/tests/Feature/Http/Api/Wiki/Entry/EntryIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Entry/EntryIndexTest.php @@ -38,9 +38,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $entries = Entry::factory() diff --git a/tests/Feature/Http/Api/Wiki/Entry/EntryShowTest.php b/tests/Feature/Http/Api/Wiki/Entry/EntryShowTest.php index 6fcc59957..cedac1ed4 100644 --- a/tests/Feature/Http/Api/Wiki/Entry/EntryShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Entry/EntryShowTest.php @@ -23,7 +23,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $entry = Entry::factory() diff --git a/tests/Feature/Http/Api/Wiki/ExternalResource/ExternalResourceIndexTest.php b/tests/Feature/Http/Api/Wiki/ExternalResource/ExternalResourceIndexTest.php index 55dd2ab4a..81f34a585 100644 --- a/tests/Feature/Http/Api/Wiki/ExternalResource/ExternalResourceIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/ExternalResource/ExternalResourceIndexTest.php @@ -36,9 +36,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $resources = ExternalResource::factory() diff --git a/tests/Feature/Http/Api/Wiki/ExternalResource/ExternalResourceShowTest.php b/tests/Feature/Http/Api/Wiki/ExternalResource/ExternalResourceShowTest.php index cb031c947..65155027d 100644 --- a/tests/Feature/Http/Api/Wiki/ExternalResource/ExternalResourceShowTest.php +++ b/tests/Feature/Http/Api/Wiki/ExternalResource/ExternalResourceShowTest.php @@ -21,7 +21,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $resource = ExternalResource::factory()->create(); diff --git a/tests/Feature/Http/Api/Wiki/Group/GroupIndexTest.php b/tests/Feature/Http/Api/Wiki/Group/GroupIndexTest.php index 2a3c13c1a..21a48a392 100644 --- a/tests/Feature/Http/Api/Wiki/Group/GroupIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Group/GroupIndexTest.php @@ -38,9 +38,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $groups = Group::factory()->count(fake()->randomDigitNotNull())->create(); diff --git a/tests/Feature/Http/Api/Wiki/Group/GroupShowTest.php b/tests/Feature/Http/Api/Wiki/Group/GroupShowTest.php index e3665a6b4..4c94cd399 100644 --- a/tests/Feature/Http/Api/Wiki/Group/GroupShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Group/GroupShowTest.php @@ -24,7 +24,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $group = Group::factory()->create(); diff --git a/tests/Feature/Http/Api/Wiki/Image/ImageIndexTest.php b/tests/Feature/Http/Api/Wiki/Image/ImageIndexTest.php index 7d7decefd..a2089f717 100644 --- a/tests/Feature/Http/Api/Wiki/Image/ImageIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Image/ImageIndexTest.php @@ -36,9 +36,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $images = Image::factory() diff --git a/tests/Feature/Http/Api/Wiki/Image/ImageShowTest.php b/tests/Feature/Http/Api/Wiki/Image/ImageShowTest.php index 47179fcf0..72b1253d5 100644 --- a/tests/Feature/Http/Api/Wiki/Image/ImageShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Image/ImageShowTest.php @@ -21,7 +21,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $image = Image::factory()->create(); diff --git a/tests/Feature/Http/Api/Wiki/Image/ImageStoreTest.php b/tests/Feature/Http/Api/Wiki/Image/ImageStoreTest.php index 76e8fff13..eb9e6cdb8 100644 --- a/tests/Feature/Http/Api/Wiki/Image/ImageStoreTest.php +++ b/tests/Feature/Http/Api/Wiki/Image/ImageStoreTest.php @@ -16,7 +16,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\post; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('protected', function (): void { $image = Image::factory()->makeOne(); @@ -66,6 +66,6 @@ test('create', function (): void { ]); $response->assertCreated(); - $this->assertCount(1, $fs->allFiles()); + expect($fs->allFiles())->toHaveCount(1); $this->assertDatabaseCount(Image::class, 1); }); diff --git a/tests/Feature/Http/Api/Wiki/Series/SeriesIndexTest.php b/tests/Feature/Http/Api/Wiki/Series/SeriesIndexTest.php index 7cf67ec63..2b519191a 100644 --- a/tests/Feature/Http/Api/Wiki/Series/SeriesIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Series/SeriesIndexTest.php @@ -35,9 +35,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $series = Series::factory()->count(fake()->randomDigitNotNull())->create(); diff --git a/tests/Feature/Http/Api/Wiki/Series/SeriesShowTest.php b/tests/Feature/Http/Api/Wiki/Series/SeriesShowTest.php index 98529751f..75c40b8dd 100644 --- a/tests/Feature/Http/Api/Wiki/Series/SeriesShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Series/SeriesShowTest.php @@ -21,7 +21,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $series = Series::factory()->create(); diff --git a/tests/Feature/Http/Api/Wiki/Song/SongIndexTest.php b/tests/Feature/Http/Api/Wiki/Song/SongIndexTest.php index 8b7ec5ca5..0c76f4c3f 100644 --- a/tests/Feature/Http/Api/Wiki/Song/SongIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Song/SongIndexTest.php @@ -39,9 +39,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $songs = Song::factory()->count(fake()->randomDigitNotNull())->create(); diff --git a/tests/Feature/Http/Api/Wiki/Song/SongShowTest.php b/tests/Feature/Http/Api/Wiki/Song/SongShowTest.php index 8930d7b65..414c7230e 100644 --- a/tests/Feature/Http/Api/Wiki/Song/SongShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Song/SongShowTest.php @@ -25,7 +25,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $song = Song::factory()->create(); diff --git a/tests/Feature/Http/Api/Wiki/Studio/StudioIndexTest.php b/tests/Feature/Http/Api/Wiki/Studio/StudioIndexTest.php index 4b4f0e0a8..abf63416b 100644 --- a/tests/Feature/Http/Api/Wiki/Studio/StudioIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Studio/StudioIndexTest.php @@ -39,9 +39,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $studio = Studio::factory()->count(fake()->randomDigitNotNull())->create(); diff --git a/tests/Feature/Http/Api/Wiki/Studio/StudioShowTest.php b/tests/Feature/Http/Api/Wiki/Studio/StudioShowTest.php index 9730c24ec..51ef1563f 100644 --- a/tests/Feature/Http/Api/Wiki/Studio/StudioShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Studio/StudioShowTest.php @@ -25,7 +25,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $studio = Studio::factory()->create(); diff --git a/tests/Feature/Http/Api/Wiki/Synonym/SynonymIndexTest.php b/tests/Feature/Http/Api/Wiki/Synonym/SynonymIndexTest.php index 8beea5a18..0bacd1cb0 100644 --- a/tests/Feature/Http/Api/Wiki/Synonym/SynonymIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Synonym/SynonymIndexTest.php @@ -28,9 +28,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Synonym::factory() diff --git a/tests/Feature/Http/Api/Wiki/Synonym/SynonymShowTest.php b/tests/Feature/Http/Api/Wiki/Synonym/SynonymShowTest.php index 1ccb35eb5..3cf5b79e8 100644 --- a/tests/Feature/Http/Api/Wiki/Synonym/SynonymShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Synonym/SynonymShowTest.php @@ -12,7 +12,7 @@ use Illuminate\Foundation\Testing\WithFaker; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $synonym = Synonym::factory()->forAnime()->createOne(); diff --git a/tests/Feature/Http/Api/Wiki/Theme/ThemeIndexTest.php b/tests/Feature/Http/Api/Wiki/Theme/ThemeIndexTest.php index 3dc31b2a7..b174b7061 100644 --- a/tests/Feature/Http/Api/Wiki/Theme/ThemeIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Theme/ThemeIndexTest.php @@ -46,9 +46,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { Theme::factory() diff --git a/tests/Feature/Http/Api/Wiki/Theme/ThemeShowTest.php b/tests/Feature/Http/Api/Wiki/Theme/ThemeShowTest.php index aaeaa1782..01cd355c0 100644 --- a/tests/Feature/Http/Api/Wiki/Theme/ThemeShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Theme/ThemeShowTest.php @@ -30,7 +30,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $theme = Theme::factory() diff --git a/tests/Feature/Http/Api/Wiki/Video/Script/ScriptIndexTest.php b/tests/Feature/Http/Api/Wiki/Video/Script/ScriptIndexTest.php index 2dbdfbf1c..88454b686 100644 --- a/tests/Feature/Http/Api/Wiki/Video/Script/ScriptIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Video/Script/ScriptIndexTest.php @@ -34,9 +34,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $scripts = VideoScript::factory() diff --git a/tests/Feature/Http/Api/Wiki/Video/Script/ScriptShowTest.php b/tests/Feature/Http/Api/Wiki/Video/Script/ScriptShowTest.php index d84d281b4..218a0a6a5 100644 --- a/tests/Feature/Http/Api/Wiki/Video/Script/ScriptShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Video/Script/ScriptShowTest.php @@ -20,7 +20,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $script = VideoScript::factory()->create(); diff --git a/tests/Feature/Http/Api/Wiki/Video/VideoIndexTest.php b/tests/Feature/Http/Api/Wiki/Video/VideoIndexTest.php index 124c7f6b8..f8163436d 100644 --- a/tests/Feature/Http/Api/Wiki/Video/VideoIndexTest.php +++ b/tests/Feature/Http/Api/Wiki/Video/VideoIndexTest.php @@ -43,9 +43,9 @@ use Illuminate\Support\Facades\Date; use function Pest\Laravel\get; -uses(SortsModels::class); +pest()->use(SortsModels::class); -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $videos = Video::factory() diff --git a/tests/Feature/Http/Api/Wiki/Video/VideoShowTest.php b/tests/Feature/Http/Api/Wiki/Video/VideoShowTest.php index 9b1682314..bdd626394 100644 --- a/tests/Feature/Http/Api/Wiki/Video/VideoShowTest.php +++ b/tests/Feature/Http/Api/Wiki/Video/VideoShowTest.php @@ -27,7 +27,7 @@ use Illuminate\Support\Arr; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $video = Video::factory()->create(); diff --git a/tests/Feature/Http/Auth/EmailVerificationTest.php b/tests/Feature/Http/Auth/EmailVerificationTest.php index c2bc281c9..108218c37 100644 --- a/tests/Feature/Http/Auth/EmailVerificationTest.php +++ b/tests/Feature/Http/Auth/EmailVerificationTest.php @@ -16,7 +16,7 @@ use function Pest\Laravel\actingAs; use Spatie\Permission\PermissionRegistrar; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('assigns default roles', function (): void { Event::fakeExcept(Verified::class); @@ -52,5 +52,5 @@ test('assigns default roles', function (): void { actingAs($user)->get($url); - $this->assertCount($defaultRoleCount, $user->roles()->get()); + expect($user->roles()->get())->toHaveCount($defaultRoleCount); }); diff --git a/tests/Feature/Http/Wiki/Audio/AudioTest.php b/tests/Feature/Http/Wiki/Audio/AudioTest.php index 1c0599eec..aa4531503 100644 --- a/tests/Feature/Http/Wiki/Audio/AudioTest.php +++ b/tests/Feature/Http/Wiki/Audio/AudioTest.php @@ -19,7 +19,7 @@ use function Pest\Laravel\get; use Symfony\Component\HttpFoundation\StreamedResponse; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('audio streaming not allowed forbidden', function (): void { Storage::fake(Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED)); @@ -88,7 +88,7 @@ test('streamed through response', function (): void { $response = get(route('audio.show', ['audio' => $audio])); - $this->assertInstanceOf(StreamedResponse::class, $response->baseResponse); + expect($response->baseResponse)->toBeInstanceOf(StreamedResponse::class); }); test('streamed through nginx redirect', function (): void { diff --git a/tests/Feature/Http/Wiki/Video/Script/ScriptTest.php b/tests/Feature/Http/Wiki/Video/Script/ScriptTest.php index c9a5a4da5..58b9d4743 100644 --- a/tests/Feature/Http/Wiki/Video/Script/ScriptTest.php +++ b/tests/Feature/Http/Wiki/Video/Script/ScriptTest.php @@ -16,7 +16,7 @@ use Laravel\Sanctum\Sanctum; use function Pest\Laravel\get; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('script downloading not allowed forbidden', function (): void { Feature::deactivate(AllowScriptDownloading::class); diff --git a/tests/Feature/Http/Wiki/Video/VideoTest.php b/tests/Feature/Http/Wiki/Video/VideoTest.php index 87ce23334..afea94228 100644 --- a/tests/Feature/Http/Wiki/Video/VideoTest.php +++ b/tests/Feature/Http/Wiki/Video/VideoTest.php @@ -25,7 +25,7 @@ use function Pest\Laravel\get; use Symfony\Component\HttpFoundation\StreamedResponse; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('video streaming not allowed forbidden', function (): void { Storage::fake(Config::get(VideoConstants::DEFAULT_DISK_QUALIFIED)); @@ -94,7 +94,7 @@ test('streamed through response', function (): void { $response = get(route('video.show', ['video' => $video])); - $this->assertInstanceOf(StreamedResponse::class, $response->baseResponse); + expect($response->baseResponse)->toBeInstanceOf(StreamedResponse::class); }); test('streamed through nginx redirect', function (): void { diff --git a/tests/Feature/Jobs/SendDiscordNotificationTest.php b/tests/Feature/Jobs/SendDiscordNotificationTest.php index ea6562aac..affb9ffa9 100644 --- a/tests/Feature/Jobs/SendDiscordNotificationTest.php +++ b/tests/Feature/Jobs/SendDiscordNotificationTest.php @@ -88,5 +88,5 @@ test('rate limited', function (): void { $middleware = collect($job->middleware())->first(); - $this->assertInstanceOf(RateLimited::class, $middleware); + expect($middleware)->toBeInstanceOf(RateLimited::class); }); diff --git a/tests/Feature/Scopes/ReadablePagesScopeTest.php b/tests/Feature/Scopes/ReadablePagesScopeTest.php index 9aeac9054..b370b8b05 100644 --- a/tests/Feature/Scopes/ReadablePagesScopeTest.php +++ b/tests/Feature/Scopes/ReadablePagesScopeTest.php @@ -27,8 +27,8 @@ test('only public pages are readable by guests', function (): void { $pages = Page::query()->get(); - $this->assertCount(1, $pages); - $this->assertEquals($publicPage->getKey(), $pages->first()->getKey()); + expect($pages)->toHaveCount(1); + expect($pages->first()->getKey())->toEqual($publicPage->getKey()); })->repeat(5); test('admin can see all pages', function (): void { @@ -54,7 +54,7 @@ test('admin can see all pages', function (): void { $pages = Page::query()->get(); - $this->assertCount($roleCount + 1, $pages); + expect($pages)->toHaveCount($roleCount + 1); }); test('user with role can see pages with that role', function (): void { @@ -94,5 +94,5 @@ test('user with role can see pages with that role', function (): void { $pages = Page::query()->get(); - $this->assertCount($userPageCount + 1, $pages); + expect($pages)->toHaveCount($userPageCount + 1); })->repeat(5); diff --git a/tests/Unit/Actions/ActionResultTest.php b/tests/Unit/Actions/ActionResultTest.php index cb25e2488..1c2a7b213 100644 --- a/tests/Unit/Actions/ActionResultTest.php +++ b/tests/Unit/Actions/ActionResultTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Arr; test('has failed', function (): void { $result = new ActionResult(ActionStatus::FAILED); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('has not failed', function (): void { @@ -24,5 +24,5 @@ test('has not failed', function (): void { $result = new ActionResult($status); - $this->assertFalse($result->hasFailed()); + expect($result->hasFailed())->toBeFalse(); }); diff --git a/tests/Unit/Actions/Repositories/ReconcileResultsTest.php b/tests/Unit/Actions/Repositories/ReconcileResultsTest.php index b8d7e2f61..2f6082b72 100644 --- a/tests/Unit/Actions/Repositories/ReconcileResultsTest.php +++ b/tests/Unit/Actions/Repositories/ReconcileResultsTest.php @@ -20,5 +20,5 @@ test('default', function (): void { } }; - $this->assertTrue($reconcileResults->getStatus() === ActionStatus::PASSED); + expect($reconcileResults->getStatus())->toBe(ActionStatus::PASSED); }); diff --git a/tests/Unit/Actions/Storage/Base/DeleteResultsTest.php b/tests/Unit/Actions/Storage/Base/DeleteResultsTest.php index b29c702d0..211215c12 100644 --- a/tests/Unit/Actions/Storage/Base/DeleteResultsTest.php +++ b/tests/Unit/Actions/Storage/Base/DeleteResultsTest.php @@ -7,7 +7,7 @@ use App\Enums\Actions\ActionStatus; use App\Models\Wiki\Video; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $video = Video::factory()->createOne(); @@ -16,7 +16,7 @@ test('default', function (): void { $result = $deleteResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('failed', function (): void { @@ -36,7 +36,7 @@ test('failed', function (): void { $result = $deleteResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -52,5 +52,5 @@ test('passed', function (): void { $result = $deleteResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); diff --git a/tests/Unit/Actions/Storage/Base/MoveResultsTest.php b/tests/Unit/Actions/Storage/Base/MoveResultsTest.php index e857966b7..1a3b70640 100644 --- a/tests/Unit/Actions/Storage/Base/MoveResultsTest.php +++ b/tests/Unit/Actions/Storage/Base/MoveResultsTest.php @@ -7,7 +7,7 @@ use App\Enums\Actions\ActionStatus; use App\Models\Wiki\Video; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $video = Video::factory()->createOne(); @@ -16,7 +16,7 @@ test('default', function (): void { $result = $moveResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('failed', function (): void { @@ -36,7 +36,7 @@ test('failed', function (): void { $result = $moveResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -52,5 +52,5 @@ test('passed', function (): void { $result = $moveResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); diff --git a/tests/Unit/Actions/Storage/Base/PruneResultsTest.php b/tests/Unit/Actions/Storage/Base/PruneResultsTest.php index ba3ce179a..4a1e4b970 100644 --- a/tests/Unit/Actions/Storage/Base/PruneResultsTest.php +++ b/tests/Unit/Actions/Storage/Base/PruneResultsTest.php @@ -6,14 +6,14 @@ use App\Actions\Storage\Base\PruneResults; use App\Enums\Actions\ActionStatus; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $pruneResults = new PruneResults(fake()->word()); $result = $pruneResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('failed', function (): void { @@ -31,7 +31,7 @@ test('failed', function (): void { $result = $pruneResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -45,5 +45,5 @@ test('passed', function (): void { $result = $pruneResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); diff --git a/tests/Unit/Actions/Storage/Base/UploadResultsTest.php b/tests/Unit/Actions/Storage/Base/UploadResultsTest.php index 68315e408..fd2903cc0 100644 --- a/tests/Unit/Actions/Storage/Base/UploadResultsTest.php +++ b/tests/Unit/Actions/Storage/Base/UploadResultsTest.php @@ -6,14 +6,14 @@ use App\Actions\Storage\Base\UploadResults; use App\Enums\Actions\ActionStatus; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default', function (): void { $uploadResults = new UploadResults(); $result = $uploadResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('failed', function (): void { @@ -31,7 +31,7 @@ test('failed', function (): void { $result = $uploadResults->toActionResult(); - $this->assertTrue($result->hasFailed()); + expect($result->hasFailed())->toBeTrue(); }); test('passed', function (): void { @@ -45,5 +45,5 @@ test('passed', function (): void { $result = $uploadResults->toActionResult(); - $this->assertTrue($result->getStatus() === ActionStatus::PASSED); + expect($result->getStatus())->toBe(ActionStatus::PASSED); }); diff --git a/tests/Unit/Discord/DiscordEmbedFieldTest.php b/tests/Unit/Discord/DiscordEmbedFieldTest.php index 039daefc5..e685cad24 100644 --- a/tests/Unit/Discord/DiscordEmbedFieldTest.php +++ b/tests/Unit/Discord/DiscordEmbedFieldTest.php @@ -9,14 +9,14 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Date; use Tests\Unit\Enums\LocalizedEnum; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('discord embed format enum', function (): void { $enum = Arr::random(LocalizedEnum::cases()); $field = new DiscordEmbedField(fake()->word(), $enum); - $this->assertEquals($enum->localize(), Arr::get($field->toArray(), 'value')); + expect(Arr::get($field->toArray(), 'value'))->toEqual($enum->localize()); }); test('discord embed format date', function (): void { @@ -24,7 +24,7 @@ test('discord embed format date', function (): void { $field = new DiscordEmbedField(fake()->word(), $date); - $this->assertEquals($date->format(AllowedDateFormat::YMD->value), Arr::get($field->toArray(), 'value')); + expect(Arr::get($field->toArray(), 'value'))->toEqual($date->format(AllowedDateFormat::YMD->value)); }); test('discord embed format boolean', function (): void { @@ -32,7 +32,7 @@ test('discord embed format boolean', function (): void { $field = new DiscordEmbedField(fake()->word(), $boolean); - $this->assertEquals($boolean ? 'true' : 'false', Arr::get($field->toArray(), 'value')); + expect(Arr::get($field->toArray(), 'value'))->toEqual($boolean ? 'true' : 'false'); }); test('discord embed format number', function (): void { @@ -40,7 +40,7 @@ test('discord embed format number', function (): void { $field = new DiscordEmbedField(fake()->word(), $number); - $this->assertEquals(strval($number), Arr::get($field->toArray(), 'value')); + expect(Arr::get($field->toArray(), 'value'))->toEqual(strval($number)); }); test('discord embed format float', function (): void { @@ -48,7 +48,7 @@ test('discord embed format float', function (): void { $field = new DiscordEmbedField(fake()->word(), $float); - $this->assertEquals(strval($float), Arr::get($field->toArray(), 'value')); + expect(Arr::get($field->toArray(), 'value'))->toEqual(strval($float)); }); test('discord embed format string', function (): void { @@ -56,29 +56,29 @@ test('discord embed format string', function (): void { $field = new DiscordEmbedField(fake()->word(), $string); - $this->assertEquals($string, Arr::get($field->toArray(), 'value')); + expect(Arr::get($field->toArray(), 'value'))->toEqual($string); }); test('discord embed format empty string', function (): void { $field = new DiscordEmbedField(fake()->word(), ''); - $this->assertEquals(DiscordEmbedField::DEFAULT_NULL_FIELD_VALUE, Arr::get($field->toArray(), 'value')); + expect(Arr::get($field->toArray(), 'value'))->toEqual(DiscordEmbedField::DEFAULT_NULL_FIELD_VALUE); }); test('discord embed format null', function (): void { $field = new DiscordEmbedField(fake()->word(), null); - $this->assertEquals(DiscordEmbedField::DEFAULT_NULL_FIELD_VALUE, Arr::get($field->toArray(), 'value')); + expect(Arr::get($field->toArray(), 'value'))->toEqual(DiscordEmbedField::DEFAULT_NULL_FIELD_VALUE); }); test('discord embed format array', function (): void { $field = new DiscordEmbedField(fake()->word(), []); - $this->assertEquals(DiscordEmbedField::DEFAULT_NULL_FIELD_VALUE, Arr::get($field->toArray(), 'value')); + expect(Arr::get($field->toArray(), 'value'))->toEqual(DiscordEmbedField::DEFAULT_NULL_FIELD_VALUE); }); test('discord embed format object', function (): void { $field = new DiscordEmbedField(fake()->word(), new stdClass()); - $this->assertEquals(DiscordEmbedField::DEFAULT_NULL_FIELD_VALUE, Arr::get($field->toArray(), 'value')); + expect(Arr::get($field->toArray(), 'value'))->toEqual(DiscordEmbedField::DEFAULT_NULL_FIELD_VALUE); }); diff --git a/tests/Unit/Enums/Models/Wiki/ResourceSiteTest.php b/tests/Unit/Enums/Models/Wiki/ResourceSiteTest.php index a057ebec5..cff3ca751 100644 --- a/tests/Unit/Enums/Models/Wiki/ResourceSiteTest.php +++ b/tests/Unit/Enums/Models/Wiki/ResourceSiteTest.php @@ -10,7 +10,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Http; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('parse id from anime resource', function (): void { $animeId = fake()->randomDigitNotNull(); @@ -26,7 +26,7 @@ test('parse id from anime resource', function (): void { $link = $site->formatResourceLink(Anime::class, $animeId); - $this->assertEquals(strval($animeId), ResourceSite::parseIdFromLink($link)); + expect(ResourceSite::parseIdFromLink($link))->toEqual(strval($animeId)); }); test('parse id from studio resource', function (): void { @@ -42,7 +42,7 @@ test('parse id from studio resource', function (): void { $link = $site->formatResourceLink(Studio::class, $studioId); - $this->assertEquals(strval($studioId), ResourceSite::parseIdFromLink($link)); + expect(ResourceSite::parseIdFromLink($link))->toEqual(strval($studioId)); }); test('fail parse anime planet id from studio resource', function (): void { @@ -52,7 +52,7 @@ test('fail parse anime planet id from studio resource', function (): void { fake()->slug() ); - $this->assertEmpty(ResourceSite::parseIdFromLink($link)); + expect(ResourceSite::parseIdFromLink($link))->toBeEmpty(); Http::assertNothingSent(); }); @@ -69,7 +69,7 @@ test('fail parse anime planet id from anime resource', function (): void { fake()->slug() ); - $this->assertEmpty(ResourceSite::parseIdFromLink($link)); + expect(ResourceSite::parseIdFromLink($link))->toBeEmpty(); Http::assertSentCount(1); }); @@ -94,7 +94,7 @@ test('parse anime planet id from anime resource', function (): void { $link = ResourceSite::ANIME_PLANET->formatResourceLink(Anime::class, $id, fake()->slug()); - $this->assertEquals(strval($id), ResourceSite::parseIdFromLink($link)); + expect(ResourceSite::parseIdFromLink($link))->toEqual(strval($id)); Http::assertSentCount(1); }); @@ -103,7 +103,7 @@ test('parse kitsu id for id from anime resource', function (): void { $link = ResourceSite::KITSU->formatResourceLink(Anime::class, $id); - $this->assertEquals($id, ResourceSite::parseIdFromLink($link)); + expect(ResourceSite::parseIdFromLink($link))->toEqual($id); }); test('parse kitsu id for slug from anime resource', function (): void { @@ -124,6 +124,6 @@ test('parse kitsu id for slug from anime resource', function (): void { ]), ]); - $this->assertEquals(strval($id), ResourceSite::parseIdFromLink($linkWithSlug)); + expect(ResourceSite::parseIdFromLink($linkWithSlug))->toEqual(strval($id)); Http::assertSentCount(1); }); diff --git a/tests/Unit/GraphQL/Filter/BooleanFilterTest.php b/tests/Unit/GraphQL/Filter/BooleanFilterTest.php index 810e3134b..ad9825d68 100644 --- a/tests/Unit/GraphQL/Filter/BooleanFilterTest.php +++ b/tests/Unit/GraphQL/Filter/BooleanFilterTest.php @@ -12,5 +12,5 @@ it('converts validated boolean', function (): void { $filterValues = $filter->getFilterValues(Arr::wrap(Arr::random([$booleanValue, $booleanValue ? 'true' : 'false']))); - $this->assertEquals($booleanValue, $filterValues[0]); + expect($filterValues[0])->toEqual($booleanValue); }); diff --git a/tests/Unit/GraphQL/Filter/EnumFilterTest.php b/tests/Unit/GraphQL/Filter/EnumFilterTest.php index 2eb1ef344..c11d2085f 100644 --- a/tests/Unit/GraphQL/Filter/EnumFilterTest.php +++ b/tests/Unit/GraphQL/Filter/EnumFilterTest.php @@ -13,7 +13,7 @@ test('enum converted to value', function (): void { $filterValues = $filter->getFilterValues(Arr::wrap($enum)); - $this->assertEquals($enum->value, $filterValues[0]); + expect($filterValues[0])->toEqual($enum->value); }); test('enum name converted to value', function (): void { @@ -23,5 +23,5 @@ test('enum name converted to value', function (): void { $filterValues = $filter->getFilterValues(Arr::wrap($enum->name)); - $this->assertEquals($enum->value, $filterValues[0]); + expect($filterValues[0])->toEqual($enum->value); }); diff --git a/tests/Unit/GraphQL/Filter/FloatFilterTest.php b/tests/Unit/GraphQL/Filter/FloatFilterTest.php index ed5b4575c..c2debe79d 100644 --- a/tests/Unit/GraphQL/Filter/FloatFilterTest.php +++ b/tests/Unit/GraphQL/Filter/FloatFilterTest.php @@ -12,5 +12,5 @@ it('converts validated floats', function (): void { $filterValues = $filter->getFilterValues(Arr::wrap($floatValue)); - $this->assertEqualsWithDelta($floatValue, $filterValues[0], 0.0001); + expect($filterValues[0])->toEqualWithDelta($floatValue, 0.0001); }); diff --git a/tests/Unit/GraphQL/Filter/IntFilterTest.php b/tests/Unit/GraphQL/Filter/IntFilterTest.php index 11d33ffa0..6144f19b7 100644 --- a/tests/Unit/GraphQL/Filter/IntFilterTest.php +++ b/tests/Unit/GraphQL/Filter/IntFilterTest.php @@ -12,5 +12,5 @@ it('converts validated integers', function (): void { $filterValues = $filter->getFilterValues(Arr::wrap($intValue)); - $this->assertEquals(intval($intValue), $filterValues[0]); + expect($filterValues[0])->toEqual(intval($intValue)); }); diff --git a/tests/Unit/GraphQL/Filter/TimestampFilterTest.php b/tests/Unit/GraphQL/Filter/TimestampFilterTest.php index 3f5b90059..f4b1ffce3 100644 --- a/tests/Unit/GraphQL/Filter/TimestampFilterTest.php +++ b/tests/Unit/GraphQL/Filter/TimestampFilterTest.php @@ -13,5 +13,5 @@ it('converts validated timestamps', function (): void { $filterValues = $filter->getFilterValues(Arr::wrap($timestampValue)); - $this->assertEquals(DateTime::createFromTimestamp($timestampValue)->format(AllowedDateFormat::YMDHIS->value), $filterValues[0]); + expect($filterValues[0])->toEqual(DateTime::createFromTimestamp($timestampValue)->format(AllowedDateFormat::YMDHIS->value)); }); diff --git a/tests/Unit/Http/Api/Criteria/Field/CriteriaTest.php b/tests/Unit/Http/Api/Criteria/Field/CriteriaTest.php index 8f840fe1f..d225773ba 100644 --- a/tests/Unit/Http/Api/Criteria/Field/CriteriaTest.php +++ b/tests/Unit/Http/Api/Criteria/Field/CriteriaTest.php @@ -6,14 +6,14 @@ use App\Http\Api\Criteria\Field\Criteria; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('is allowed field', function (): void { $fields = collect(fake()->words(fake()->randomDigitNotNull())); $criteria = new Criteria(fake()->word(), $fields); - $this->assertTrue($criteria->isAllowedField($fields->random())); + expect($criteria->isAllowedField($fields->random()))->toBeTrue(); }); test('is not allowed', function (): void { @@ -21,5 +21,5 @@ test('is not allowed', function (): void { $criteria = new Criteria(fake()->word(), $fields); - $this->assertFalse($criteria->isAllowedField(Str::random())); + expect($criteria->isAllowedField(Str::random()))->toBeFalse(); }); diff --git a/tests/Unit/Http/Api/Criteria/Filter/CriteriaTest.php b/tests/Unit/Http/Api/Criteria/Filter/CriteriaTest.php index f0d5ec0d7..271b13d4c 100644 --- a/tests/Unit/Http/Api/Criteria/Filter/CriteriaTest.php +++ b/tests/Unit/Http/Api/Criteria/Filter/CriteriaTest.php @@ -14,7 +14,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; use Tests\Unit\Http\Api\Criteria\Filter\FakeCriteria; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('should not filter if key mismatch', function (): void { $expression = new Expression(fake()->word()); @@ -71,7 +71,7 @@ test('should not filter if key mismatch', function (): void { } }; - $this->assertFalse($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeFalse(); }); test('should filter if key match', function (): void { @@ -131,7 +131,7 @@ test('should filter if key match', function (): void { } }; - $this->assertTrue($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeTrue(); }); test('should not filter if not within scope', function (): void { @@ -191,7 +191,7 @@ test('should not filter if not within scope', function (): void { } }; - $this->assertFalse($criteria->shouldFilter($filter, new GlobalScope())); + expect($criteria->shouldFilter($filter, new GlobalScope()))->toBeFalse(); }); test('should filter if within scope', function (): void { @@ -251,5 +251,5 @@ test('should filter if within scope', function (): void { } }; - $this->assertTrue($criteria->shouldFilter($filter, $scope)); + expect($criteria->shouldFilter($filter, $scope))->toBeTrue(); }); diff --git a/tests/Unit/Http/Api/Criteria/Filter/HasCriteriaTest.php b/tests/Unit/Http/Api/Criteria/Filter/HasCriteriaTest.php index 4e58c5a07..a27020a27 100644 --- a/tests/Unit/Http/Api/Criteria/Filter/HasCriteriaTest.php +++ b/tests/Unit/Http/Api/Criteria/Filter/HasCriteriaTest.php @@ -11,18 +11,18 @@ use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Arr; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('field', function (): void { $criteria = HasCriteria::make(new GlobalScope(), HasCriteria::PARAM_VALUE, fake()->word()); - $this->assertEquals(HasCriteria::PARAM_VALUE, $criteria->getField()); + expect($criteria->getField())->toEqual(HasCriteria::PARAM_VALUE); }); test('default comparison operator', function (): void { $criteria = HasCriteria::make(new GlobalScope(), HasCriteria::PARAM_VALUE, fake()->word()); - $this->assertEquals(ComparisonOperator::GTE, $criteria->getComparisonOperator()); + expect($criteria->getComparisonOperator())->toEqual(ComparisonOperator::GTE); }); test('comparison operator', function (): void { @@ -32,13 +32,13 @@ test('comparison operator', function (): void { $criteria = HasCriteria::make(new GlobalScope(), $filterParam, fake()->word()); - $this->assertEquals($operator, $criteria->getComparisonOperator()); + expect($criteria->getComparisonOperator())->toEqual($operator); }); test('default count', function (): void { $criteria = HasCriteria::make(new GlobalScope(), HasCriteria::PARAM_VALUE, fake()->word()); - $this->assertEquals(1, $criteria->getCount()); + expect($criteria->getCount())->toEqual(1); }); test('count', function (): void { @@ -48,13 +48,13 @@ test('count', function (): void { $criteria = HasCriteria::make(new GlobalScope(), $filterParam, fake()->word()); - $this->assertEquals($count, $criteria->getCount()); + expect($criteria->getCount())->toEqual($count); }); test('default logical operator', function (): void { $criteria = HasCriteria::make(new GlobalScope(), fake()->word(), fake()->word()); - $this->assertEquals(BinaryLogicalOperator::AND, $criteria->getLogicalOperator()); + expect($criteria->getLogicalOperator())->toEqual(BinaryLogicalOperator::AND); }); test('logical operator', function (): void { @@ -64,5 +64,5 @@ test('logical operator', function (): void { $criteria = HasCriteria::make(new GlobalScope(), $filterParam, fake()->word()); - $this->assertEquals($operator, $criteria->getLogicalOperator()); + expect($criteria->getLogicalOperator())->toEqual($operator); }); diff --git a/tests/Unit/Http/Api/Criteria/Filter/TrashedCriteriaTest.php b/tests/Unit/Http/Api/Criteria/Filter/TrashedCriteriaTest.php index 33d892ec2..373cc0af8 100644 --- a/tests/Unit/Http/Api/Criteria/Filter/TrashedCriteriaTest.php +++ b/tests/Unit/Http/Api/Criteria/Filter/TrashedCriteriaTest.php @@ -6,10 +6,10 @@ use App\Http\Api\Criteria\Filter\TrashedCriteria; use App\Http\Api\Scope\GlobalScope; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('field', function (): void { $criteria = TrashedCriteria::make(new GlobalScope(), TrashedCriteria::PARAM_VALUE, fake()->word()); - $this->assertEquals(TrashedCriteria::PARAM_VALUE, $criteria->getField()); + expect($criteria->getField())->toEqual(TrashedCriteria::PARAM_VALUE); }); diff --git a/tests/Unit/Http/Api/Criteria/Filter/WhereCriteriaTest.php b/tests/Unit/Http/Api/Criteria/Filter/WhereCriteriaTest.php index 90840f1e6..d854e5959 100644 --- a/tests/Unit/Http/Api/Criteria/Filter/WhereCriteriaTest.php +++ b/tests/Unit/Http/Api/Criteria/Filter/WhereCriteriaTest.php @@ -11,20 +11,20 @@ use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Arr; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('field', function (): void { $field = fake()->word(); $criteria = WhereCriteria::make(new GlobalScope(), $field, fake()->word()); - $this->assertEquals($field, $criteria->getField()); + expect($criteria->getField())->toEqual($field); }); test('default comparison operator', function (): void { $criteria = WhereCriteria::make(new GlobalScope(), fake()->word(), fake()->word()); - $this->assertEquals(ComparisonOperator::EQ, $criteria->getComparisonOperator()); + expect($criteria->getComparisonOperator())->toEqual(ComparisonOperator::EQ); }); test('comparison operator', function (): void { @@ -34,13 +34,13 @@ test('comparison operator', function (): void { $criteria = WhereCriteria::make(new GlobalScope(), $filterParam, fake()->word()); - $this->assertEquals($operator, $criteria->getComparisonOperator()); + expect($criteria->getComparisonOperator())->toEqual($operator); }); test('default logical operator', function (): void { $criteria = WhereCriteria::make(new GlobalScope(), fake()->word(), fake()->word()); - $this->assertEquals(BinaryLogicalOperator::AND, $criteria->getLogicalOperator()); + expect($criteria->getLogicalOperator())->toEqual(BinaryLogicalOperator::AND); }); test('logical operator', function (): void { @@ -50,5 +50,5 @@ test('logical operator', function (): void { $criteria = WhereCriteria::make(new GlobalScope(), $filterParam, fake()->word()); - $this->assertEquals($operator, $criteria->getLogicalOperator()); + expect($criteria->getLogicalOperator())->toEqual($operator); }); diff --git a/tests/Unit/Http/Api/Criteria/Filter/WhereInCriteriaTest.php b/tests/Unit/Http/Api/Criteria/Filter/WhereInCriteriaTest.php index 0d617bbc5..3d2d20b26 100644 --- a/tests/Unit/Http/Api/Criteria/Filter/WhereInCriteriaTest.php +++ b/tests/Unit/Http/Api/Criteria/Filter/WhereInCriteriaTest.php @@ -12,14 +12,14 @@ use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Arr; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('field', function (): void { $field = fake()->word(); $criteria = WhereInCriteria::make(new GlobalScope(), $field, fake()->word()); - $this->assertEquals($field, $criteria->getField()); + expect($criteria->getField())->toEqual($field); }); test('comparison operator', function (): void { @@ -34,13 +34,13 @@ test('comparison operator', function (): void { $criteria = WhereInCriteria::make(new GlobalScope(), $filterParam, fake()->word()); - $this->assertNull($criteria->getComparisonOperator()); + expect($criteria->getComparisonOperator())->toBeNull(); }); test('default logical operator', function (): void { $criteria = WhereInCriteria::make(new GlobalScope(), fake()->word(), fake()->word()); - $this->assertEquals(BinaryLogicalOperator::AND, $criteria->getLogicalOperator()); + expect($criteria->getLogicalOperator())->toEqual(BinaryLogicalOperator::AND); }); test('logical operator', function (): void { @@ -50,13 +50,13 @@ test('logical operator', function (): void { $criteria = WhereInCriteria::make(new GlobalScope(), $filterParam, fake()->word()); - $this->assertEquals($operator, $criteria->getLogicalOperator()); + expect($criteria->getLogicalOperator())->toEqual($operator); }); test('default unary operator', function (): void { $criteria = WhereInCriteria::make(new GlobalScope(), fake()->word(), fake()->word()); - $this->assertFalse($criteria->not()); + expect($criteria->not())->toBeFalse(); }); test('unary operator', function (): void { @@ -69,5 +69,5 @@ test('unary operator', function (): void { $criteria = WhereInCriteria::make(new GlobalScope(), $filterParam, fake()->word()); - $this->assertTrue($criteria->not()); + expect($criteria->not())->toBeTrue(); }); diff --git a/tests/Unit/Http/Api/Criteria/Paging/CriteriaTest.php b/tests/Unit/Http/Api/Criteria/Paging/CriteriaTest.php index 1b17c5449..6b42659f1 100644 --- a/tests/Unit/Http/Api/Criteria/Paging/CriteriaTest.php +++ b/tests/Unit/Http/Api/Criteria/Paging/CriteriaTest.php @@ -9,7 +9,7 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Arr; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default size', function (): void { $resultSize = fake()->numberBetween(1, Criteria::MAX_RESULTS); @@ -33,7 +33,7 @@ test('default size', function (): void { } }; - $this->assertEquals($resultSize, $criteria->getResultSize()); + expect($criteria->getResultSize())->toEqual($resultSize); }); test('upper bound size', function (): void { @@ -58,7 +58,7 @@ test('upper bound size', function (): void { } }; - $this->assertEquals(Criteria::DEFAULT_SIZE, $criteria->getResultSize()); + expect($criteria->getResultSize())->toEqual(Criteria::DEFAULT_SIZE); }); test('lower bound size', function (): void { @@ -83,5 +83,5 @@ test('lower bound size', function (): void { } }; - $this->assertEquals(Criteria::DEFAULT_SIZE, $criteria->getResultSize()); + expect($criteria->getResultSize())->toEqual(Criteria::DEFAULT_SIZE); }); diff --git a/tests/Unit/Http/Api/Criteria/Sort/CriteriaTest.php b/tests/Unit/Http/Api/Criteria/Sort/CriteriaTest.php index acfb43da1..8c5aca797 100644 --- a/tests/Unit/Http/Api/Criteria/Sort/CriteriaTest.php +++ b/tests/Unit/Http/Api/Criteria/Sort/CriteriaTest.php @@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('should not sort if key mismatch', function (): void { $criteria = new class(new GlobalScope(), fake()->unique()->word()) extends Criteria @@ -26,7 +26,7 @@ test('should not sort if key mismatch', function (): void { $sort = new Sort(fake()->unique()->word()); - $this->assertFalse($criteria->shouldSort($sort, $criteria->getScope())); + expect($criteria->shouldSort($sort, $criteria->getScope()))->toBeFalse(); }); test('should sort if key match', function (): void { @@ -45,7 +45,7 @@ test('should sort if key match', function (): void { $sort = new Sort($key); - $this->assertTrue($criteria->shouldSort($sort, $criteria->getScope())); + expect($criteria->shouldSort($sort, $criteria->getScope()))->toBeTrue(); }); test('should not sort if not within scope', function (): void { @@ -66,7 +66,7 @@ test('should not sort if not within scope', function (): void { $sort = new Sort($key); - $this->assertFalse($criteria->shouldSort($sort, new GlobalScope())); + expect($criteria->shouldSort($sort, new GlobalScope()))->toBeFalse(); }); test('should sort if within scope', function (): void { @@ -87,5 +87,5 @@ test('should sort if within scope', function (): void { $sort = new Sort($key); - $this->assertTrue($criteria->shouldSort($sort, $scope)); + expect($criteria->shouldSort($sort, $scope))->toBeTrue(); }); diff --git a/tests/Unit/Http/Api/Filter/BooleanFilterTest.php b/tests/Unit/Http/Api/Filter/BooleanFilterTest.php index 85c0f11ec..6f65351b7 100644 --- a/tests/Unit/Http/Api/Filter/BooleanFilterTest.php +++ b/tests/Unit/Http/Api/Filter/BooleanFilterTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; use Tests\Unit\Http\Api\Criteria\Filter\FakeCriteria; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('should not apply if no booleans', function (): void { $filterField = fake()->word(); @@ -18,7 +18,7 @@ test('should not apply if no booleans', function (): void { $filter = new BooleanFilter($filterField); - $this->assertFalse($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeFalse(); }); test('should not apply if all booleans', function (): void { @@ -28,7 +28,7 @@ test('should not apply if all booleans', function (): void { $filter = new BooleanFilter($filterField); - $this->assertFalse($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeFalse(); }); test('converts validated boolean', function (): void { @@ -38,5 +38,5 @@ test('converts validated boolean', function (): void { $filterValues = $filter->getFilterValues(Arr::wrap($booleanValue ? 'true' : 'false')); - $this->assertEquals($booleanValue, $filterValues[0]); + expect($filterValues[0])->toEqual($booleanValue); }); diff --git a/tests/Unit/Http/Api/Filter/DateFilterTest.php b/tests/Unit/Http/Api/Filter/DateFilterTest.php index 89c99a0e2..de4f171a9 100644 --- a/tests/Unit/Http/Api/Filter/DateFilterTest.php +++ b/tests/Unit/Http/Api/Filter/DateFilterTest.php @@ -10,7 +10,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Date; use Tests\Unit\Http\Api\Criteria\Filter\FakeCriteria; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('should not apply if no dates', function (): void { $filterField = fake()->word(); @@ -19,7 +19,7 @@ test('should not apply if no dates', function (): void { $filter = new DateFilter($filterField); - $this->assertFalse($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeFalse(); }); test('should not apply if wrong format', function (): void { @@ -29,7 +29,7 @@ test('should not apply if wrong format', function (): void { $filter = new DateFilter($filterField); - $this->assertFalse($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeFalse(); }); test('should apply if accepted format', function (): void { @@ -41,7 +41,7 @@ test('should apply if accepted format', function (): void { $filter = new DateFilter($filterField); - $this->assertTrue($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeTrue(); }); test('converts dates to canonical format', function (): void { @@ -57,8 +57,5 @@ test('converts dates to canonical format', function (): void { $filterValues = $filter->getFilterValues($criteria->getFilterValues()); - $this->assertEquals( - DateTime::createFromFormat('!'.$dateFormat->value, $dateFilter)->format(AllowedDateFormat::YMDHISU->value), - $filterValues[0] - ); + expect($filterValues[0])->toEqual(DateTime::createFromFormat('!'.$dateFormat->value, $dateFilter)->format(AllowedDateFormat::YMDHISU->value)); }); diff --git a/tests/Unit/Http/Api/Filter/EnumFilterTest.php b/tests/Unit/Http/Api/Filter/EnumFilterTest.php index 836fccf69..21950cf0f 100644 --- a/tests/Unit/Http/Api/Filter/EnumFilterTest.php +++ b/tests/Unit/Http/Api/Filter/EnumFilterTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Arr; use Tests\Unit\Enums\LocalizedEnum; use Tests\Unit\Http\Api\Criteria\Filter\FakeCriteria; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('should not apply if no enums', function (): void { $filterField = fake()->word(); @@ -18,7 +18,7 @@ test('should not apply if no enums', function (): void { $filter = new EnumFilter($filterField, LocalizedEnum::class); - $this->assertFalse($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeFalse(); }); test('should not apply if all enums', function (): void { @@ -32,7 +32,7 @@ test('should not apply if all enums', function (): void { $filter = new EnumFilter($filterField, LocalizedEnum::class); - $this->assertFalse($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeFalse(); }); test('enum key converted to value', function (): void { @@ -46,5 +46,5 @@ test('enum key converted to value', function (): void { $filterValues = $filter->getFilterValues($criteria->getFilterValues()); - $this->assertEquals($enum->value, $filterValues[0]); + expect($filterValues[0])->toEqual($enum->value); }); diff --git a/tests/Unit/Http/Api/Filter/FilterTest.php b/tests/Unit/Http/Api/Filter/FilterTest.php index ec0a85cd7..b86b8a172 100644 --- a/tests/Unit/Http/Api/Filter/FilterTest.php +++ b/tests/Unit/Http/Api/Filter/FilterTest.php @@ -6,7 +6,7 @@ use App\Enums\Http\Api\Filter\ComparisonOperator; use App\Http\Api\Filter\Filter; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default column', function (): void { $filter = new class(fake()->word()) extends Filter @@ -55,5 +55,5 @@ test('default column', function (): void { } }; - $this->assertEquals($filter->getKey(), $filter->getColumn()); + expect($filter->getColumn())->toEqual($filter->getKey()); }); diff --git a/tests/Unit/Http/Api/Filter/FloatFilterTest.php b/tests/Unit/Http/Api/Filter/FloatFilterTest.php index dbd1bfe6d..3bc72e9f4 100644 --- a/tests/Unit/Http/Api/Filter/FloatFilterTest.php +++ b/tests/Unit/Http/Api/Filter/FloatFilterTest.php @@ -7,7 +7,7 @@ use App\Http\Api\Scope\GlobalScope; use Illuminate\Foundation\Testing\WithFaker; use Tests\Unit\Http\Api\Criteria\Filter\FakeCriteria; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('should not apply if no floats', function (): void { $filterField = fake()->word(); @@ -16,7 +16,7 @@ test('should not apply if no floats', function (): void { $filter = new FloatFilter($filterField); - $this->assertFalse($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeFalse(); }); test('converts validated floats', function (): void { @@ -30,5 +30,5 @@ test('converts validated floats', function (): void { $filterValues = $filter->getFilterValues($criteria->getFilterValues()); - $this->assertEqualsWithDelta($floatValue, $filterValues[0], 0.0001); + expect($filterValues[0])->toEqualWithDelta($floatValue, 0.0001); }); diff --git a/tests/Unit/Http/Api/Filter/HasFilterTest.php b/tests/Unit/Http/Api/Filter/HasFilterTest.php index aa0853bac..d8d5ce724 100644 --- a/tests/Unit/Http/Api/Filter/HasFilterTest.php +++ b/tests/Unit/Http/Api/Filter/HasFilterTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Collection; use Illuminate\Support\Str; use Tests\Unit\Http\Api\Criteria\Filter\FakeCriteria; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('should not apply if no allowed paths', function (): void { $criteria = FakeCriteria::make(new GlobalScope(), HasCriteria::PARAM_VALUE, Str::random()); @@ -58,7 +58,7 @@ test('should not apply if no allowed paths', function (): void { $filter = new HasFilter($allowedIncludes->all()); - $this->assertFalse($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeFalse(); }); test('should apply if allowed paths', function (): void { @@ -107,5 +107,5 @@ test('should apply if allowed paths', function (): void { $filter = new HasFilter($allowedIncludes->all()); - $this->assertTrue($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeTrue(); }); diff --git a/tests/Unit/Http/Api/Filter/IntFilterTest.php b/tests/Unit/Http/Api/Filter/IntFilterTest.php index 4a6a84fdb..20444a7f5 100644 --- a/tests/Unit/Http/Api/Filter/IntFilterTest.php +++ b/tests/Unit/Http/Api/Filter/IntFilterTest.php @@ -7,7 +7,7 @@ use App\Http\Api\Scope\GlobalScope; use Illuminate\Foundation\Testing\WithFaker; use Tests\Unit\Http\Api\Criteria\Filter\FakeCriteria; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('should not apply if no integers', function (): void { $filterField = fake()->word(); @@ -16,7 +16,7 @@ test('should not apply if no integers', function (): void { $filter = new IntFilter($filterField); - $this->assertFalse($criteria->shouldFilter($filter, $criteria->getScope())); + expect($criteria->shouldFilter($filter, $criteria->getScope()))->toBeFalse(); }); test('converts validated integers', function (): void { @@ -30,5 +30,5 @@ test('converts validated integers', function (): void { $filterValues = $filter->getFilterValues($criteria->getFilterValues()); - $this->assertEquals(intval($intValue), $filterValues[0]); + expect($filterValues[0])->toEqual(intval($intValue)); }); diff --git a/tests/Unit/Http/Api/Parser/FieldParserTest.php b/tests/Unit/Http/Api/Parser/FieldParserTest.php index f9949e62d..b7b8f3826 100644 --- a/tests/Unit/Http/Api/Parser/FieldParserTest.php +++ b/tests/Unit/Http/Api/Parser/FieldParserTest.php @@ -6,12 +6,12 @@ use App\Http\Api\Criteria\Field\Criteria; use App\Http\Api\Parser\FieldParser; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no criteria by default', function (): void { $parameters = []; - $this->assertEmpty(FieldParser::parse($parameters)); + expect(FieldParser::parse($parameters))->toBeEmpty(); }); test('parse criteria', function (): void { @@ -25,7 +25,7 @@ test('parse criteria', function (): void { $criteria = FieldParser::parse($parameters)[0]; - $this->assertInstanceOf(Criteria::class, $criteria); + expect($criteria)->toBeInstanceOf(Criteria::class); }); test('parse type', function (): void { @@ -41,7 +41,7 @@ test('parse type', function (): void { $criteria = FieldParser::parse($parameters)[0]; - $this->assertEquals($type, $criteria->getType()); + expect($criteria->getType())->toEqual($type); }); test('parse fields', function (): void { @@ -55,5 +55,5 @@ test('parse fields', function (): void { $criteria = FieldParser::parse($parameters)[0]; - $this->assertEquals($fields, $criteria->getFields()->all()); + expect($criteria->getFields()->all())->toEqual($fields); }); diff --git a/tests/Unit/Http/Api/Parser/FilterParserTest.php b/tests/Unit/Http/Api/Parser/FilterParserTest.php index 012eaede8..b0c7be883 100644 --- a/tests/Unit/Http/Api/Parser/FilterParserTest.php +++ b/tests/Unit/Http/Api/Parser/FilterParserTest.php @@ -12,12 +12,12 @@ use App\Http\Api\Scope\TypeScope; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no criteria by default', function (): void { $parameters = []; - $this->assertEmpty(FilterParser::parse($parameters)); + expect(FilterParser::parse($parameters))->toBeEmpty(); }); test('parse trashed criteria', function (): void { @@ -29,7 +29,7 @@ test('parse trashed criteria', function (): void { $criteria = FilterParser::parse($parameters)[0]; - $this->assertInstanceOf(TrashedCriteria::class, $criteria); + expect($criteria)->toBeInstanceOf(TrashedCriteria::class); }); test('parse where in criteria', function (): void { @@ -43,7 +43,7 @@ test('parse where in criteria', function (): void { $criteria = FilterParser::parse($parameters)[0]; - $this->assertInstanceOf(WhereInCriteria::class, $criteria); + expect($criteria)->toBeInstanceOf(WhereInCriteria::class); }); test('parse has criteria', function (): void { @@ -55,7 +55,7 @@ test('parse has criteria', function (): void { $criteria = FilterParser::parse($parameters)[0]; - $this->assertInstanceOf(HasCriteria::class, $criteria); + expect($criteria)->toBeInstanceOf(HasCriteria::class); }); test('parse where criteria', function (): void { @@ -67,7 +67,7 @@ test('parse where criteria', function (): void { $criteria = FilterParser::parse($parameters)[0]; - $this->assertInstanceOf(WhereCriteria::class, $criteria); + expect($criteria)->toBeInstanceOf(WhereCriteria::class); }); test('parse global scope', function (): void { @@ -79,7 +79,7 @@ test('parse global scope', function (): void { $criteria = FilterParser::parse($parameters)[0]; - $this->assertInstanceOf(GlobalScope::class, $criteria->getScope()); + expect($criteria->getScope())->toBeInstanceOf(GlobalScope::class); }); test('parse type scope', function (): void { @@ -97,5 +97,5 @@ test('parse type scope', function (): void { $scope = $criteria->getScope(); - $this->assertTrue($scope instanceof TypeScope && $scope->getType() === $type); + expect($scope instanceof TypeScope && $scope->getType() === $type)->toBeTrue(); }); diff --git a/tests/Unit/Http/Api/Parser/IncludeParserTest.php b/tests/Unit/Http/Api/Parser/IncludeParserTest.php index 06489db89..fbb74d4c3 100644 --- a/tests/Unit/Http/Api/Parser/IncludeParserTest.php +++ b/tests/Unit/Http/Api/Parser/IncludeParserTest.php @@ -7,12 +7,12 @@ use App\Http\Api\Criteria\Include\ResourceCriteria; use App\Http\Api\Parser\IncludeParser; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no criteria by default', function (): void { $parameters = []; - $this->assertEmpty(IncludeParser::parse($parameters)); + expect(IncludeParser::parse($parameters))->toBeEmpty(); }); test('parse criteria', function (): void { @@ -24,7 +24,7 @@ test('parse criteria', function (): void { $criteria = IncludeParser::parse($parameters)[0]; - $this->assertInstanceOf(Criteria::class, $criteria); + expect($criteria)->toBeInstanceOf(Criteria::class); }); test('parse criteria paths', function (): void { @@ -36,7 +36,7 @@ test('parse criteria paths', function (): void { $criteria = IncludeParser::parse($parameters)[0]; - $this->assertEquals(collect($fields)->unique()->all(), $criteria->getPaths()->all()); + expect($criteria->getPaths()->all())->toEqual(collect($fields)->unique()->all()); }); test('parse resource criteria', function (): void { @@ -50,7 +50,7 @@ test('parse resource criteria', function (): void { $criteria = IncludeParser::parse($parameters)[0]; - $this->assertInstanceOf(ResourceCriteria::class, $criteria); + expect($criteria)->toBeInstanceOf(ResourceCriteria::class); }); test('parse resource criteria type', function (): void { @@ -66,10 +66,8 @@ test('parse resource criteria type', function (): void { $criteria = IncludeParser::parse($parameters)[0]; - $this->assertTrue( - $criteria instanceof ResourceCriteria - && $criteria->getType() === $type - ); + expect($criteria instanceof ResourceCriteria + && $criteria->getType() === $type)->toBeTrue(); }); test('parse resource criteria paths', function (): void { @@ -83,5 +81,5 @@ test('parse resource criteria paths', function (): void { $criteria = IncludeParser::parse($parameters)[0]; - $this->assertEquals($fields->unique()->all(), $criteria->getPaths()->all()); + expect($criteria->getPaths()->all())->toEqual($fields->unique()->all()); }); diff --git a/tests/Unit/Http/Api/Parser/PagingParserTest.php b/tests/Unit/Http/Api/Parser/PagingParserTest.php index bfc3a1590..b193a7b26 100644 --- a/tests/Unit/Http/Api/Parser/PagingParserTest.php +++ b/tests/Unit/Http/Api/Parser/PagingParserTest.php @@ -9,14 +9,14 @@ use App\Http\Api\Criteria\Paging\OffsetCriteria; use App\Http\Api\Parser\PagingParser; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('parse limit criteria by default', function (): void { $parameters = []; $criteria = collect(PagingParser::parse($parameters))->first(fn (Criteria $criteria): bool => $criteria->getStrategy() === PaginationStrategy::LIMIT); - $this->assertInstanceOf(LimitCriteria::class, $criteria); + expect($criteria)->toBeInstanceOf(LimitCriteria::class); }); test('parse invalid limit criteria', function (): void { @@ -30,10 +30,8 @@ test('parse invalid limit criteria', function (): void { $criteria = collect(PagingParser::parse($parameters))->first(fn (Criteria $criteria): bool => $criteria->getStrategy() === PaginationStrategy::LIMIT); - $this->assertTrue( - $criteria instanceof LimitCriteria - && $criteria->getResultSize() === Criteria::DEFAULT_SIZE - ); + expect($criteria instanceof LimitCriteria + && $criteria->getResultSize() === Criteria::DEFAULT_SIZE)->toBeTrue(); }); test('parse valid limit criteria', function (): void { @@ -47,10 +45,8 @@ test('parse valid limit criteria', function (): void { $criteria = collect(PagingParser::parse($parameters))->first(fn (Criteria $criteria): bool => $criteria->getStrategy() === PaginationStrategy::LIMIT); - $this->assertTrue( - $criteria instanceof LimitCriteria - && $criteria->getResultSize() === $limit - ); + expect($criteria instanceof LimitCriteria + && $criteria->getResultSize() === $limit)->toBeTrue(); }); test('parse offset criteria by default', function (): void { @@ -58,7 +54,7 @@ test('parse offset criteria by default', function (): void { $criteria = collect(PagingParser::parse($parameters))->first(fn (Criteria $criteria): bool => $criteria->getStrategy() === PaginationStrategy::OFFSET); - $this->assertInstanceOf(OffsetCriteria::class, $criteria); + expect($criteria)->toBeInstanceOf(OffsetCriteria::class); }); test('parse invalid offset criteria', function (): void { @@ -72,10 +68,8 @@ test('parse invalid offset criteria', function (): void { $criteria = collect(PagingParser::parse($parameters))->first(fn (Criteria $criteria): bool => $criteria->getStrategy() === PaginationStrategy::OFFSET); - $this->assertTrue( - $criteria instanceof OffsetCriteria - && $criteria->getResultSize() === Criteria::DEFAULT_SIZE - ); + expect($criteria instanceof OffsetCriteria + && $criteria->getResultSize() === Criteria::DEFAULT_SIZE)->toBeTrue(); }); test('parse valid offset criteria', function (): void { @@ -89,8 +83,6 @@ test('parse valid offset criteria', function (): void { $criteria = collect(PagingParser::parse($parameters))->first(fn (Criteria $criteria): bool => $criteria->getStrategy() === PaginationStrategy::OFFSET); - $this->assertTrue( - $criteria instanceof OffsetCriteria - && $criteria->getResultSize() === $size - ); + expect($criteria instanceof OffsetCriteria + && $criteria->getResultSize() === $size)->toBeTrue(); }); diff --git a/tests/Unit/Http/Api/Parser/SearchParserTest.php b/tests/Unit/Http/Api/Parser/SearchParserTest.php index 6bd16dfa6..9fc9388b7 100644 --- a/tests/Unit/Http/Api/Parser/SearchParserTest.php +++ b/tests/Unit/Http/Api/Parser/SearchParserTest.php @@ -6,12 +6,12 @@ use App\Http\Api\Parser\SearchParser; use App\Scout\Criteria; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no criteria by default', function (): void { $parameters = []; - $this->assertEmpty(SearchParser::parse($parameters)); + expect(SearchParser::parse($parameters))->toBeEmpty(); }); test('parse search criteria', function (): void { @@ -21,7 +21,7 @@ test('parse search criteria', function (): void { $criteria = SearchParser::parse($parameters)[0]; - $this->assertInstanceOf(Criteria::class, $criteria); + expect($criteria)->toBeInstanceOf(Criteria::class); }); test('parse search criteria term', function (): void { @@ -33,5 +33,5 @@ test('parse search criteria term', function (): void { $criteria = SearchParser::parse($parameters)[0]; - $this->assertEquals($term, $criteria->getTerm()); + expect($criteria->getTerm())->toEqual($term); }); diff --git a/tests/Unit/Http/Api/Parser/SortParserTest.php b/tests/Unit/Http/Api/Parser/SortParserTest.php index 884fa3bde..76c8666ad 100644 --- a/tests/Unit/Http/Api/Parser/SortParserTest.php +++ b/tests/Unit/Http/Api/Parser/SortParserTest.php @@ -12,12 +12,12 @@ use App\Http\Api\Scope\TypeScope; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('no criteria by default', function (): void { $parameters = []; - $this->assertEmpty(SortParser::parse($parameters)); + expect(SortParser::parse($parameters))->toBeEmpty(); }); test('parse random criteria', function (): void { @@ -27,7 +27,7 @@ test('parse random criteria', function (): void { $criteria = SortParser::parse($parameters)[0]; - $this->assertInstanceOf(RandomCriteria::class, $criteria); + expect($criteria)->toBeInstanceOf(RandomCriteria::class); }); test('parse relation criteria', function (): void { @@ -37,7 +37,7 @@ test('parse relation criteria', function (): void { $criteria = SortParser::parse($parameters)[0]; - $this->assertInstanceOf(RelationCriteria::class, $criteria); + expect($criteria)->toBeInstanceOf(RelationCriteria::class); }); test('parse field criteria', function (): void { @@ -47,7 +47,7 @@ test('parse field criteria', function (): void { $criteria = SortParser::parse($parameters)[0]; - $this->assertInstanceOf(FieldCriteria::class, $criteria); + expect($criteria)->toBeInstanceOf(FieldCriteria::class); }); test('parse criteria field', function (): void { @@ -59,7 +59,7 @@ test('parse criteria field', function (): void { $criteria = SortParser::parse($parameters)[0]; - $this->assertEquals($field, $criteria->getField()); + expect($criteria->getField())->toEqual($field); }); test('parse default direction', function (): void { @@ -69,10 +69,8 @@ test('parse default direction', function (): void { $criteria = SortParser::parse($parameters)[0]; - $this->assertTrue( - $criteria instanceof FieldCriteria - && $criteria->getDirection() === Direction::ASCENDING - ); + expect($criteria instanceof FieldCriteria + && $criteria->getDirection() === Direction::ASCENDING)->toBeTrue(); }); test('parse descending direction', function (): void { @@ -84,10 +82,8 @@ test('parse descending direction', function (): void { $criteria = SortParser::parse($parameters)[0]; - $this->assertTrue( - $criteria instanceof FieldCriteria - && $criteria->getDirection() === Direction::DESCENDING - ); + expect($criteria instanceof FieldCriteria + && $criteria->getDirection() === Direction::DESCENDING)->toBeTrue(); }); test('parse global scope', function (): void { @@ -97,7 +93,7 @@ test('parse global scope', function (): void { $criteria = SortParser::parse($parameters)[0]; - $this->assertInstanceOf(GlobalScope::class, $criteria->getScope()); + expect($criteria->getScope())->toBeInstanceOf(GlobalScope::class); }); test('parse type scope', function (): void { @@ -113,5 +109,5 @@ test('parse type scope', function (): void { $scope = $criteria->getScope(); - $this->assertTrue($scope instanceof TypeScope && $scope->getType() === $type); + expect($scope instanceof TypeScope && $scope->getType() === $type)->toBeTrue(); }); diff --git a/tests/Unit/Http/Api/Query/QueryTest.php b/tests/Unit/Http/Api/Query/QueryTest.php index 68bc6c940..bfb6a48fb 100644 --- a/tests/Unit/Http/Api/Query/QueryTest.php +++ b/tests/Unit/Http/Api/Query/QueryTest.php @@ -19,7 +19,7 @@ use Illuminate\Support\Collection; use Illuminate\Support\Str; use Tests\Unit\Http\Api\Query\FakeQuery; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('get field criteria', function (): void { $type = fake()->word(); @@ -32,7 +32,7 @@ test('get field criteria', function (): void { $query = new FakeQuery($parameters); - $this->assertInstanceOf(FieldCriteria::class, $query->getFieldCriteria($type)); + expect($query->getFieldCriteria($type))->toBeInstanceOf(FieldCriteria::class); }); test('get include criteria', function (): void { @@ -42,7 +42,7 @@ test('get include criteria', function (): void { $query = new FakeQuery($parameters); - $this->assertInstanceOf(IncludeCriteria::class, $query->getIncludeCriteria(fake()->word())); + expect($query->getIncludeCriteria(fake()->word()))->toBeInstanceOf(IncludeCriteria::class); }); test('get include resource criteria', function (): void { @@ -56,7 +56,7 @@ test('get include resource criteria', function (): void { $query = new FakeQuery($parameters); - $this->assertInstanceOf(ResourceCriteria::class, $query->getIncludeCriteria($type)); + expect($query->getIncludeCriteria($type))->toBeInstanceOf(ResourceCriteria::class); }); test('get sort criteria', function (): void { @@ -68,7 +68,7 @@ test('get sort criteria', function (): void { $query = new FakeQuery($parameters); - $this->assertCount($fields->count(), $query->getSortCriteria()); + expect($query->getSortCriteria())->toHaveCount($fields->count()); }); test('get filter criteria', function (): void { @@ -81,7 +81,7 @@ test('get filter criteria', function (): void { $query = new FakeQuery($parameters); - $this->assertCount($filterCount, $query->getFilterCriteria()); + expect($query->getFilterCriteria())->toHaveCount($filterCount); }); test('does not have search', function (): void { @@ -89,7 +89,7 @@ test('does not have search', function (): void { $query = new FakeQuery($parameters); - $this->assertFalse($query->hasSearchCriteria()); + expect($query->hasSearchCriteria())->toBeFalse(); }); test('has search', function (): void { @@ -99,7 +99,7 @@ test('has search', function (): void { $query = new FakeQuery($parameters); - $this->assertTrue($query->hasSearchCriteria()); + expect($query->hasSearchCriteria())->toBeTrue(); }); test('null search', function (): void { @@ -107,7 +107,7 @@ test('null search', function (): void { $query = new FakeQuery($parameters); - $this->assertNull($query->getSearchCriteria()); + expect($query->getSearchCriteria())->toBeNull(); }); test('get search', function (): void { @@ -117,7 +117,7 @@ test('get search', function (): void { $query = new FakeQuery($parameters); - $this->assertInstanceOf(SearchCriteria::class, $query->getSearchCriteria()); + expect($query->getSearchCriteria())->toBeInstanceOf(SearchCriteria::class); }); test('get limit criteria', function (): void { @@ -125,7 +125,7 @@ test('get limit criteria', function (): void { $query = new FakeQuery($parameters); - $this->assertInstanceOf(LimitCriteria::class, $query->getPagingCriteria(PaginationStrategy::LIMIT)); + expect($query->getPagingCriteria(PaginationStrategy::LIMIT))->toBeInstanceOf(LimitCriteria::class); }); test('get offset criteria', function (): void { @@ -133,5 +133,5 @@ test('get offset criteria', function (): void { $query = new FakeQuery($parameters); - $this->assertInstanceOf(OffsetCriteria::class, $query->getPagingCriteria(PaginationStrategy::OFFSET)); + expect($query->getPagingCriteria(PaginationStrategy::OFFSET))->toBeInstanceOf(OffsetCriteria::class); }); diff --git a/tests/Unit/Http/Api/Scope/GlobalScopeTest.php b/tests/Unit/Http/Api/Scope/GlobalScopeTest.php index 412d78c2e..d7ad1879c 100644 --- a/tests/Unit/Http/Api/Scope/GlobalScopeTest.php +++ b/tests/Unit/Http/Api/Scope/GlobalScopeTest.php @@ -7,14 +7,14 @@ use App\Http\Api\Scope\RelationScope; use App\Http\Api\Scope\TypeScope; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('global scope is within scope', function (): void { $scope = new GlobalScope(); $otherScope = new GlobalScope(); - $this->assertTrue($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeTrue(); }); test('type scope is within scope', function (): void { @@ -22,7 +22,7 @@ test('type scope is within scope', function (): void { $otherScope = new TypeScope(fake()->word()); - $this->assertTrue($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeTrue(); }); test('relation scope is within scope', function (): void { @@ -30,5 +30,5 @@ test('relation scope is within scope', function (): void { $otherScope = new RelationScope(fake()->word()); - $this->assertTrue($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeTrue(); }); diff --git a/tests/Unit/Http/Api/Scope/RelationScopeTest.php b/tests/Unit/Http/Api/Scope/RelationScopeTest.php index 1f0ff9275..cd80ea649 100644 --- a/tests/Unit/Http/Api/Scope/RelationScopeTest.php +++ b/tests/Unit/Http/Api/Scope/RelationScopeTest.php @@ -7,14 +7,14 @@ use App\Http\Api\Scope\RelationScope; use App\Http\Api\Scope\TypeScope; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('global scope is not within scope', function (): void { $scope = new RelationScope(fake()->word()); $otherScope = new GlobalScope(); - $this->assertFalse($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeFalse(); }); test('type scope is not within scope', function (): void { @@ -22,7 +22,7 @@ test('type scope is not within scope', function (): void { $otherScope = new TypeScope(fake()->word()); - $this->assertFalse($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeFalse(); }); test('unequal relation is not within scope', function (): void { @@ -30,7 +30,7 @@ test('unequal relation is not within scope', function (): void { $otherScope = new RelationScope(fake()->unique()->word()); - $this->assertFalse($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeFalse(); }); test('relation is within scope', function (): void { @@ -40,5 +40,5 @@ test('relation is within scope', function (): void { $otherScope = new RelationScope($relation); - $this->assertTrue($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeTrue(); }); diff --git a/tests/Unit/Http/Api/Scope/ScopeParserTest.php b/tests/Unit/Http/Api/Scope/ScopeParserTest.php index 7cf44549e..3d0765a1b 100644 --- a/tests/Unit/Http/Api/Scope/ScopeParserTest.php +++ b/tests/Unit/Http/Api/Scope/ScopeParserTest.php @@ -8,18 +8,18 @@ use App\Http\Api\Scope\ScopeParser; use App\Http\Api\Scope\TypeScope; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('parse global scope', function (): void { - $this->assertInstanceOf(GlobalScope::class, ScopeParser::parse('')); + expect(ScopeParser::parse(''))->toBeInstanceOf(GlobalScope::class); }); test('parse type scope', function (): void { - $this->assertInstanceOf(TypeScope::class, ScopeParser::parse(fake()->word())); + expect(ScopeParser::parse(fake()->word()))->toBeInstanceOf(TypeScope::class); }); test('parse relation scope', function (): void { $relation = collect(fake()->words())->join('.'); - $this->assertInstanceOf(RelationScope::class, ScopeParser::parse($relation)); + expect(ScopeParser::parse($relation))->toBeInstanceOf(RelationScope::class); }); diff --git a/tests/Unit/Http/Api/Scope/TypeScopeTest.php b/tests/Unit/Http/Api/Scope/TypeScopeTest.php index 123a88874..0b8a65d5d 100644 --- a/tests/Unit/Http/Api/Scope/TypeScopeTest.php +++ b/tests/Unit/Http/Api/Scope/TypeScopeTest.php @@ -7,14 +7,14 @@ use App\Http\Api\Scope\RelationScope; use App\Http\Api\Scope\TypeScope; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('global scope is not within scope', function (): void { $scope = new TypeScope(fake()->word()); $otherScope = new GlobalScope(); - $this->assertFalse($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeFalse(); }); test('type scope is not within scope', function (): void { @@ -22,7 +22,7 @@ test('type scope is not within scope', function (): void { $otherScope = new TypeScope(fake()->unique()->word()); - $this->assertFalse($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeFalse(); }); test('type scope is within scope', function (): void { @@ -32,7 +32,7 @@ test('type scope is within scope', function (): void { $otherScope = new TypeScope($type); - $this->assertTrue($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeTrue(); }); test('relation scope is not within scope', function (): void { @@ -40,7 +40,7 @@ test('relation scope is not within scope', function (): void { $otherScope = new RelationScope(fake()->word()); - $this->assertFalse($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeFalse(); }); test('relation scope is within scope', function (): void { @@ -50,5 +50,5 @@ test('relation scope is within scope', function (): void { $otherScope = new RelationScope($type); - $this->assertTrue($scope->isWithinScope($otherScope)); + expect($scope->isWithinScope($otherScope))->toBeTrue(); }); diff --git a/tests/Unit/Http/Api/Sort/RandomSortTest.php b/tests/Unit/Http/Api/Sort/RandomSortTest.php index 083d6a990..f4d15b8c0 100644 --- a/tests/Unit/Http/Api/Sort/RandomSortTest.php +++ b/tests/Unit/Http/Api/Sort/RandomSortTest.php @@ -8,12 +8,12 @@ use App\Http\Api\Sort\RandomSort; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Arr; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('format', function (): void { $sort = new RandomSort(); $direction = Arr::random(Direction::cases()); - $this->assertEquals(RandomCriteria::PARAM_VALUE, $sort->format($direction)); + expect($sort->format($direction))->toEqual(RandomCriteria::PARAM_VALUE); }); diff --git a/tests/Unit/Http/Api/Sort/SortTest.php b/tests/Unit/Http/Api/Sort/SortTest.php index 557061ada..721323de1 100644 --- a/tests/Unit/Http/Api/Sort/SortTest.php +++ b/tests/Unit/Http/Api/Sort/SortTest.php @@ -6,12 +6,12 @@ use App\Enums\Http\Api\Sort\Direction; use App\Http\Api\Sort\Sort; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('default column', function (): void { $sort = new Sort(fake()->word()); - $this->assertEquals($sort->getKey(), $sort->getColumn()); + expect($sort->getColumn())->toEqual($sort->getKey()); }); test('format asc', function (): void { @@ -19,7 +19,7 @@ test('format asc', function (): void { $sort = new Sort($sortField); - $this->assertEquals($sortField, $sort->format(Direction::ASCENDING)); + expect($sort->format(Direction::ASCENDING))->toEqual($sortField); }); test('format desc', function (): void { @@ -27,5 +27,5 @@ test('format desc', function (): void { $sort = new Sort($sortField); - $this->assertEquals("-$sortField", $sort->format(Direction::DESCENDING)); + expect($sort->format(Direction::DESCENDING))->toEqual("-$sortField"); }); diff --git a/tests/Unit/Models/Admin/AnnouncementTest.php b/tests/Unit/Models/Admin/AnnouncementTest.php index 1b790eddc..e40d6545c 100644 --- a/tests/Unit/Models/Admin/AnnouncementTest.php +++ b/tests/Unit/Models/Admin/AnnouncementTest.php @@ -7,11 +7,11 @@ use App\Models\Admin\Announcement; test('nameable', function (): void { $announcement = Announcement::factory()->createOne(); - $this->assertIsString($announcement->getName()); + expect($announcement->getName())->toBeString(); }); test('has subtitle', function (): void { $announcement = Announcement::factory()->createOne(); - $this->assertIsString($announcement->getSubtitle()); + expect($announcement->getSubtitle())->toBeString(); }); diff --git a/tests/Unit/Models/Admin/DumpTest.php b/tests/Unit/Models/Admin/DumpTest.php index f653d4b24..e17ee0ec4 100644 --- a/tests/Unit/Models/Admin/DumpTest.php +++ b/tests/Unit/Models/Admin/DumpTest.php @@ -7,11 +7,11 @@ use App\Models\Admin\Dump; test('nameable', function (): void { $dump = Dump::factory()->createOne(); - $this->assertIsString($dump->getName()); + expect($dump->getName())->toBeString(); }); test('has subtitle', function (): void { $dump = Dump::factory()->createOne(); - $this->assertIsString($dump->getSubtitle()); + expect($dump->getSubtitle())->toBeString(); }); diff --git a/tests/Unit/Models/Admin/FeatureTest.php b/tests/Unit/Models/Admin/FeatureTest.php index 164de25af..8d7a90a88 100644 --- a/tests/Unit/Models/Admin/FeatureTest.php +++ b/tests/Unit/Models/Admin/FeatureTest.php @@ -5,24 +5,24 @@ declare(strict_types=1); use App\Models\Admin\Feature; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('nameable', function (): void { $feature = Feature::factory()->createOne(); - $this->assertIsString($feature->getName()); + expect($feature->getName())->toBeString(); }); test('has subtitle', function (): void { $feature = Feature::factory()->createOne(); - $this->assertIsString($feature->getSubtitle()); + expect($feature->getSubtitle())->toBeString(); }); test('nullable scope', function (): void { $feature = Feature::factory()->createOne(); - $this->assertTrue($feature->isNullScope()); + expect($feature->isNullScope())->toBeTrue(); }); test('non null scope', function (): void { @@ -30,5 +30,5 @@ test('non null scope', function (): void { Feature::ATTRIBUTE_SCOPE => fake()->word(), ]); - $this->assertFalse($feature->isNullScope()); + expect($feature->isNullScope())->toBeFalse(); }); diff --git a/tests/Unit/Models/Admin/FeaturedThemeTest.php b/tests/Unit/Models/Admin/FeaturedThemeTest.php index ef7dd9bf8..c5f4e06fe 100644 --- a/tests/Unit/Models/Admin/FeaturedThemeTest.php +++ b/tests/Unit/Models/Admin/FeaturedThemeTest.php @@ -14,7 +14,7 @@ use Illuminate\Support\Carbon; test('nameable', function (): void { $featuredTheme = FeaturedTheme::factory()->createOne(); - $this->assertIsString($featuredTheme->getName()); + expect($featuredTheme->getName())->toBeString(); }); test('has subtitle', function (): void { @@ -22,19 +22,19 @@ test('has subtitle', function (): void { ->for(Entry::factory()->for(Theme::factory()->for(Anime::factory()))) ->createOne(); - $this->assertIsString($featuredTheme->getSubtitle()); + expect($featuredTheme->getSubtitle())->toBeString(); }); test('casts end at', function (): void { $featuredTheme = FeaturedTheme::factory()->createOne(); - $this->assertInstanceOf(Carbon::class, $featuredTheme->end_at); + expect($featuredTheme->end_at)->toBeInstanceOf(Carbon::class); }); test('casts start at', function (): void { $featuredTheme = FeaturedTheme::factory()->createOne(); - $this->assertInstanceOf(Carbon::class, $featuredTheme->start_at); + expect($featuredTheme->start_at)->toBeInstanceOf(Carbon::class); }); test('user', function (): void { @@ -42,8 +42,8 @@ test('user', function (): void { ->for(User::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $featuredTheme->user()); - $this->assertInstanceOf(User::class, $featuredTheme->user()->first()); + expect($featuredTheme->user())->toBeInstanceOf(BelongsTo::class); + expect($featuredTheme->user()->first())->toBeInstanceOf(User::class); }); test('video', function (): void { @@ -51,8 +51,8 @@ test('video', function (): void { ->for(Video::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $featuredTheme->video()); - $this->assertInstanceOf(Video::class, $featuredTheme->video()->first()); + expect($featuredTheme->video())->toBeInstanceOf(BelongsTo::class); + expect($featuredTheme->video()->first())->toBeInstanceOf(Video::class); }); test('entry', function (): void { @@ -60,6 +60,6 @@ test('entry', function (): void { ->for(Entry::factory()->for(Theme::factory()->for(Anime::factory()))) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $featuredTheme->entry()); - $this->assertInstanceOf(Entry::class, $featuredTheme->entry()->first()); + expect($featuredTheme->entry())->toBeInstanceOf(BelongsTo::class); + expect($featuredTheme->entry()->first())->toBeInstanceOf(Entry::class); }); diff --git a/tests/Unit/Models/Auth/UserTest.php b/tests/Unit/Models/Auth/UserTest.php index 48e517037..8a669420b 100644 --- a/tests/Unit/Models/Auth/UserTest.php +++ b/tests/Unit/Models/Auth/UserTest.php @@ -13,16 +13,16 @@ use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Facades\Notification; use Laravel\Sanctum\PersonalAccessToken; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('tokens', function (): void { $user = User::factory()->createOne(); $user->createToken(fake()->word()); - $this->assertInstanceOf(MorphMany::class, $user->tokens()); - $this->assertEquals(1, $user->tokens()->count()); - $this->assertInstanceOf(PersonalAccessToken::class, $user->tokens()->first()); + expect($user->tokens())->toBeInstanceOf(MorphMany::class); + expect($user->tokens()->count())->toEqual(1); + expect($user->tokens()->first())->toBeInstanceOf(PersonalAccessToken::class); }); test('verification email notification', function (): void { @@ -36,13 +36,13 @@ test('verification email notification', function (): void { test('nameable', function (): void { $user = User::factory()->createOne(); - $this->assertIsString($user->getName()); + expect($user->getName())->toBeString(); }); test('has subtitle', function (): void { $user = User::factory()->createOne(); - $this->assertIsString($user->getSubtitle()); + expect($user->getSubtitle())->toBeString(); }); test('playlists', function (): void { @@ -52,9 +52,9 @@ test('playlists', function (): void { ->has(Playlist::factory()->count($playlistCount)) ->createOne(); - $this->assertInstanceOf(HasMany::class, $user->playlists()); - $this->assertEquals($playlistCount, $user->playlists()->count()); - $this->assertInstanceOf(Playlist::class, $user->playlists()->first()); + expect($user->playlists())->toBeInstanceOf(HasMany::class); + expect($user->playlists()->count())->toEqual($playlistCount); + expect($user->playlists()->first())->toBeInstanceOf(Playlist::class); }); test('external profiles', function (): void { @@ -64,9 +64,9 @@ test('external profiles', function (): void { ->has(ExternalProfile::factory()->count($profileCount)) ->createOne(); - $this->assertInstanceOf(HasMany::class, $user->externalprofiles()); - $this->assertEquals($profileCount, $user->externalprofiles()->count()); - $this->assertInstanceOf(ExternalProfile::class, $user->externalprofiles()->first()); + expect($user->externalprofiles())->toBeInstanceOf(HasMany::class); + expect($user->externalprofiles()->count())->toEqual($profileCount); + expect($user->externalprofiles()->first())->toBeInstanceOf(ExternalProfile::class); }); test('notifications', function (): void { @@ -76,7 +76,7 @@ test('notifications', function (): void { ->has(UserNotification::factory()->count($notificationCount)) ->createOne(); - $this->assertInstanceOf(MorphMany::class, $user->notifications()); - $this->assertEquals($notificationCount, $user->notifications()->count()); - $this->assertInstanceOf(UserNotification::class, $user->notifications()->first()); + expect($user->notifications())->toBeInstanceOf(MorphMany::class); + expect($user->notifications()->count())->toEqual($notificationCount); + expect($user->notifications()->first())->toBeInstanceOf(UserNotification::class); }); diff --git a/tests/Unit/Models/Document/PageTest.php b/tests/Unit/Models/Document/PageTest.php index c2ec212c7..946dc02e0 100644 --- a/tests/Unit/Models/Document/PageTest.php +++ b/tests/Unit/Models/Document/PageTest.php @@ -11,13 +11,13 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany; test('nameable', function (): void { $page = Page::factory()->createOne(); - $this->assertIsString($page->getName()); + expect($page->getName())->toBeString(); }); test('has subtitle', function (): void { $page = Page::factory()->createOne(); - $this->assertIsString($page->getSubtitle()); + expect($page->getSubtitle())->toBeString(); }); test('previous', function (): void { @@ -25,8 +25,8 @@ test('previous', function (): void { ->for(Page::factory(), Page::RELATION_PREVIOUS) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $page->previous()); - $this->assertInstanceOf(Page::class, $page->previous()->first()); + expect($page->previous())->toBeInstanceOf(BelongsTo::class); + expect($page->previous()->first())->toBeInstanceOf(Page::class); }); test('next', function (): void { @@ -34,8 +34,8 @@ test('next', function (): void { ->for(Page::factory(), Page::RELATION_NEXT) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $page->next()); - $this->assertInstanceOf(Page::class, $page->next()->first()); + expect($page->next())->toBeInstanceOf(BelongsTo::class); + expect($page->next()->first())->toBeInstanceOf(Page::class); }); test('roles', function (): void { @@ -52,8 +52,8 @@ test('roles', function (): void { ->count($roleCount) ->create(); - $this->assertInstanceOf(BelongsToMany::class, $page->roles()); - $this->assertEquals($roleCount, $page->roles()->count()); - $this->assertInstanceOf(Role::class, $page->roles()->first()); - $this->assertEquals(PageRole::class, $page->roles()->getPivotClass()); + expect($page->roles())->toBeInstanceOf(BelongsToMany::class); + expect($page->roles()->count())->toEqual($roleCount); + expect($page->roles()->first())->toBeInstanceOf(Role::class); + expect($page->roles()->getPivotClass())->toEqual(PageRole::class); }); diff --git a/tests/Unit/Models/List/External/ExternalEntryTest.php b/tests/Unit/Models/List/External/ExternalEntryTest.php index b3174cd37..981478102 100644 --- a/tests/Unit/Models/List/External/ExternalEntryTest.php +++ b/tests/Unit/Models/List/External/ExternalEntryTest.php @@ -15,7 +15,7 @@ test('casts status to enum', function (): void { $status = $entry->status; - $this->assertInstanceOf(ExternalEntryStatus::class, $status); + expect($status)->toBeInstanceOf(ExternalEntryStatus::class); }); test('casts is favorite to bool', function (): void { @@ -25,7 +25,7 @@ test('casts is favorite to bool', function (): void { $is_favorite = $entry->is_favorite; - $this->assertIsBool($is_favorite); + expect($is_favorite)->toBeBool(); }); test('nameable', function (): void { @@ -33,7 +33,7 @@ test('nameable', function (): void { ->for(ExternalProfile::factory()) ->createOne(); - $this->assertIsString($entry->getName()); + expect($entry->getName())->toBeString(); }); test('has subtitle', function (): void { @@ -42,7 +42,7 @@ test('has subtitle', function (): void { ->for(Anime::factory()) ->createOne(); - $this->assertIsString($entry->getSubtitle()); + expect($entry->getSubtitle())->toBeString(); }); test('profile', function (): void { @@ -50,8 +50,8 @@ test('profile', function (): void { ->for(ExternalProfile::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $entry->externalprofile()); - $this->assertInstanceOf(ExternalProfile::class, $entry->externalprofile()->first()); + expect($entry->externalprofile())->toBeInstanceOf(BelongsTo::class); + expect($entry->externalprofile()->first())->toBeInstanceOf(ExternalProfile::class); }); test('anime', function (): void { @@ -60,6 +60,6 @@ test('anime', function (): void { ->for(Anime::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $entry->anime()); - $this->assertInstanceOf(Anime::class, $entry->anime()->first()); + expect($entry->anime())->toBeInstanceOf(BelongsTo::class); + expect($entry->anime()->first())->toBeInstanceOf(Anime::class); }); diff --git a/tests/Unit/Models/List/External/ExternalTokenTest.php b/tests/Unit/Models/List/External/ExternalTokenTest.php index 0047d4d9e..206025ab9 100644 --- a/tests/Unit/Models/List/External/ExternalTokenTest.php +++ b/tests/Unit/Models/List/External/ExternalTokenTest.php @@ -12,7 +12,7 @@ test('nameable', function (): void { $token = ExternalToken::factory() ->createOne(); - $this->assertIsString($token->getName()); + expect($token->getName())->toBeString(); }); test('has subtitle', function (): void { @@ -20,7 +20,7 @@ test('has subtitle', function (): void { ->for(ExternalProfile::factory()) ->createOne(); - $this->assertIsString($token->getSubtitle()); + expect($token->getSubtitle())->toBeString(); }); test('profile', function (): void { @@ -28,8 +28,8 @@ test('profile', function (): void { ->for(ExternalProfile::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $token->externalprofile()); - $this->assertInstanceOf(ExternalProfile::class, $token->externalprofile()->first()); + expect($token->externalprofile())->toBeInstanceOf(BelongsTo::class); + expect($token->externalprofile()->first())->toBeInstanceOf(ExternalProfile::class); }); test('user', function (): void { @@ -37,6 +37,6 @@ test('user', function (): void { ->for(ExternalProfile::factory()->for(User::factory())) ->createOne(); - $this->assertInstanceOf(BelongsToThrough::class, $token->user()); - $this->assertInstanceOf(User::class, $token->user()->first()); + expect($token->user())->toBeInstanceOf(BelongsToThrough::class); + expect($token->user()->first())->toBeInstanceOf(User::class); }); diff --git a/tests/Unit/Models/List/ExternalProfileTest.php b/tests/Unit/Models/List/ExternalProfileTest.php index 6a6ca14f8..3b6932d32 100644 --- a/tests/Unit/Models/List/ExternalProfileTest.php +++ b/tests/Unit/Models/List/ExternalProfileTest.php @@ -14,14 +14,14 @@ use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Arr; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('casts site to enum', function (): void { $profile = ExternalProfile::factory()->createOne(); $site = $profile->site; - $this->assertInstanceOf(ExternalProfileSite::class, $site); + expect($site)->toBeInstanceOf(ExternalProfileSite::class); }); test('casts visibility to enum', function (): void { @@ -29,13 +29,13 @@ test('casts visibility to enum', function (): void { $visibility = $profile->visibility; - $this->assertInstanceOf(ExternalProfileVisibility::class, $visibility); + expect($visibility)->toBeInstanceOf(ExternalProfileVisibility::class); }); test('nameable', function (): void { $profile = ExternalProfile::factory()->createOne(); - $this->assertIsString($profile->getName()); + expect($profile->getName())->toBeString(); }); test('has subtitle', function (): void { @@ -43,7 +43,7 @@ test('has subtitle', function (): void { ->for(User::factory()) ->createOne(); - $this->assertIsString($profile->getSubtitle()); + expect($profile->getSubtitle())->toBeString(); }); test('searchable if public', function (): void { @@ -52,7 +52,7 @@ test('searchable if public', function (): void { ExternalProfile::ATTRIBUTE_VISIBILITY => ExternalProfileVisibility::PUBLIC->value, ]); - $this->assertTrue($profile->shouldBeSearchable()); + expect($profile->shouldBeSearchable())->toBeTrue(); }); test('not searchable if not public', function (): void { @@ -70,7 +70,7 @@ test('not searchable if not public', function (): void { ExternalProfile::ATTRIBUTE_VISIBILITY => $visibility->value, ]); - $this->assertFalse($profile->shouldBeSearchable()); + expect($profile->shouldBeSearchable())->toBeFalse(); }); test('claimed', function (): void { @@ -81,8 +81,8 @@ test('claimed', function (): void { $unclaimedProfile = ExternalProfile::factory() ->createOne(); - $this->assertTrue($claimedProfile->isClaimed()); - $this->assertFalse($unclaimedProfile->isClaimed()); + expect($claimedProfile->isClaimed())->toBeTrue(); + expect($unclaimedProfile->isClaimed())->toBeFalse(); }); test('user', function (): void { @@ -90,8 +90,8 @@ test('user', function (): void { ->for(User::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $profile->user()); - $this->assertInstanceOf(User::class, $profile->user()->first()); + expect($profile->user())->toBeInstanceOf(BelongsTo::class); + expect($profile->user()->first())->toBeInstanceOf(User::class); }); test('external token', function (): void { @@ -99,8 +99,8 @@ test('external token', function (): void { ->has(ExternalToken::factory(), ExternalProfile::RELATION_EXTERNAL_TOKEN) ->createOne(); - $this->assertInstanceOf(HasOne::class, $profile->externaltoken()); - $this->assertInstanceOf(ExternalToken::class, $profile->externaltoken()->first()); + expect($profile->externaltoken())->toBeInstanceOf(HasOne::class); + expect($profile->externaltoken()->first())->toBeInstanceOf(ExternalToken::class); }); test('external entries', function (): void { @@ -113,7 +113,7 @@ test('external entries', function (): void { ->count($entryCount) ->create(); - $this->assertInstanceOf(HasMany::class, $profile->externalentries()); - $this->assertEquals($entryCount, $profile->externalentries()->count()); - $this->assertInstanceOf(ExternalEntry::class, $profile->externalentries()->first()); + expect($profile->externalentries())->toBeInstanceOf(HasMany::class); + expect($profile->externalentries()->count())->toEqual($entryCount); + expect($profile->externalentries()->first())->toBeInstanceOf(ExternalEntry::class); }); diff --git a/tests/Unit/Models/List/Playlist/TrackTest.php b/tests/Unit/Models/List/Playlist/TrackTest.php index 313b7d07e..cd1818833 100644 --- a/tests/Unit/Models/List/Playlist/TrackTest.php +++ b/tests/Unit/Models/List/Playlist/TrackTest.php @@ -13,7 +13,7 @@ test('nameable', function (): void { ->for(Playlist::factory()) ->createOne(); - $this->assertIsString($track->getName()); + expect($track->getName())->toBeString(); }); test('has subtitle', function (): void { @@ -21,7 +21,7 @@ test('has subtitle', function (): void { ->for(Playlist::factory()->for(User::factory())) ->createOne(); - $this->assertIsString($track->getSubtitle()); + expect($track->getSubtitle())->toBeString(); }); test('hashids', function (): void { @@ -31,8 +31,8 @@ test('hashids', function (): void { ->for($playlist) ->createOne(); - $this->assertEmpty(array_diff([$playlist->playlist_id, $track->track_id], $track->hashids())); - $this->assertEmpty(array_diff($track->hashids(), [$playlist->playlist_id, $track->track_id])); + expect(array_diff([$playlist->playlist_id, $track->track_id], $track->hashids()))->toBeEmpty(); + expect(array_diff($track->hashids(), [$playlist->playlist_id, $track->track_id]))->toBeEmpty(); }); test('playlist', function (): void { @@ -40,8 +40,8 @@ test('playlist', function (): void { ->for(Playlist::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $track->playlist()); - $this->assertInstanceOf(Playlist::class, $track->playlist()->first()); + expect($track->playlist())->toBeInstanceOf(BelongsTo::class); + expect($track->playlist()->first())->toBeInstanceOf(Playlist::class); }); test('previous', function (): void { @@ -57,8 +57,8 @@ test('previous', function (): void { $track->previous()->associate($previous)->save(); - $this->assertInstanceOf(BelongsTo::class, $track->previous()); - $this->assertInstanceOf(PlaylistTrack::class, $track->previous()->first()); + expect($track->previous())->toBeInstanceOf(BelongsTo::class); + expect($track->previous()->first())->toBeInstanceOf(PlaylistTrack::class); }); test('next', function (): void { @@ -74,8 +74,8 @@ test('next', function (): void { $track->next()->associate($next)->save(); - $this->assertInstanceOf(BelongsTo::class, $track->next()); - $this->assertInstanceOf(PlaylistTrack::class, $track->next()->first()); + expect($track->next())->toBeInstanceOf(BelongsTo::class); + expect($track->next()->first())->toBeInstanceOf(PlaylistTrack::class); }); test('video', function (): void { @@ -84,6 +84,6 @@ test('video', function (): void { ->for(Video::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $track->video()); - $this->assertInstanceOf(Video::class, $track->video()->first()); + expect($track->video())->toBeInstanceOf(BelongsTo::class); + expect($track->video()->first())->toBeInstanceOf(Video::class); }); diff --git a/tests/Unit/Models/List/PlaylistTest.php b/tests/Unit/Models/List/PlaylistTest.php index 3c816aeb9..85d4d9ea5 100644 --- a/tests/Unit/Models/List/PlaylistTest.php +++ b/tests/Unit/Models/List/PlaylistTest.php @@ -14,20 +14,20 @@ use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Arr; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('casts season to enum', function (): void { $playlist = Playlist::factory()->createOne(); $visibility = $playlist->visibility; - $this->assertInstanceOf(PlaylistVisibility::class, $visibility); + expect($visibility)->toBeInstanceOf(PlaylistVisibility::class); }); test('nameable', function (): void { $playlist = Playlist::factory()->createOne(); - $this->assertIsString($playlist->getName()); + expect($playlist->getName())->toBeString(); }); test('has subtitle', function (): void { @@ -35,7 +35,7 @@ test('has subtitle', function (): void { ->for(User::factory()) ->createOne(); - $this->assertIsString($playlist->getSubtitle()); + expect($playlist->getSubtitle())->toBeString(); }); test('searchable if public', function (): void { @@ -44,7 +44,7 @@ test('searchable if public', function (): void { Playlist::ATTRIBUTE_VISIBILITY => PlaylistVisibility::PUBLIC->value, ]); - $this->assertTrue($playlist->shouldBeSearchable()); + expect($playlist->shouldBeSearchable())->toBeTrue(); }); test('not searchable if not public', function (): void { @@ -62,14 +62,14 @@ test('not searchable if not public', function (): void { Playlist::ATTRIBUTE_VISIBILITY => $visibility->value, ]); - $this->assertFalse($playlist->shouldBeSearchable()); + expect($playlist->shouldBeSearchable())->toBeFalse(); }); test('hashids nullable user', function (): void { $playlist = Playlist::factory()->createOne(); - $this->assertEmpty(array_diff([$playlist->playlist_id], $playlist->hashids())); - $this->assertEmpty(array_diff($playlist->hashids(), [$playlist->playlist_id])); + expect(array_diff([$playlist->playlist_id], $playlist->hashids()))->toBeEmpty(); + expect(array_diff($playlist->hashids(), [$playlist->playlist_id]))->toBeEmpty(); }); test('hashids non null user', function (): void { @@ -79,8 +79,8 @@ test('hashids non null user', function (): void { ->for($user) ->createOne(); - $this->assertEmpty(array_diff([$user->id, $playlist->playlist_id], $playlist->hashids())); - $this->assertEmpty(array_diff($playlist->hashids(), [$user->id, $playlist->playlist_id])); + expect(array_diff([$user->id, $playlist->playlist_id], $playlist->hashids()))->toBeEmpty(); + expect(array_diff($playlist->hashids(), [$user->id, $playlist->playlist_id]))->toBeEmpty(); }); test('user', function (): void { @@ -88,8 +88,8 @@ test('user', function (): void { ->for(User::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $playlist->user()); - $this->assertInstanceOf(User::class, $playlist->user()->first()); + expect($playlist->user())->toBeInstanceOf(BelongsTo::class); + expect($playlist->user()->first())->toBeInstanceOf(User::class); }); test('first', function (): void { @@ -102,8 +102,8 @@ test('first', function (): void { $playlist->first()->associate($first)->save(); - $this->assertInstanceOf(BelongsTo::class, $playlist->first()); - $this->assertInstanceOf(PlaylistTrack::class, $playlist->first()->first()); + expect($playlist->first())->toBeInstanceOf(BelongsTo::class); + expect($playlist->first()->first())->toBeInstanceOf(PlaylistTrack::class); }); test('last', function (): void { @@ -115,8 +115,8 @@ test('last', function (): void { $playlist->last()->associate($last)->save(); - $this->assertInstanceOf(BelongsTo::class, $playlist->last()); - $this->assertInstanceOf(PlaylistTrack::class, $playlist->last()->first()); + expect($playlist->last())->toBeInstanceOf(BelongsTo::class); + expect($playlist->last()->first())->toBeInstanceOf(PlaylistTrack::class); }); test('images', function (): void { @@ -126,10 +126,10 @@ test('images', function (): void { ->has(Image::factory()->count($imageCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $playlist->images()); - $this->assertEquals($imageCount, $playlist->images()->count()); - $this->assertInstanceOf(Image::class, $playlist->images()->first()); - $this->assertEquals(Imageable::class, $playlist->images()->getPivotClass()); + expect($playlist->images())->toBeInstanceOf(MorphToMany::class); + expect($playlist->images()->count())->toEqual($imageCount); + expect($playlist->images()->first())->toBeInstanceOf(Image::class); + expect($playlist->images()->getPivotClass())->toEqual(Imageable::class); }); test('tracks', function (): void { @@ -142,7 +142,7 @@ test('tracks', function (): void { ->count($trackCount) ->create(); - $this->assertInstanceOf(HasMany::class, $playlist->tracks()); - $this->assertEquals($trackCount, $playlist->tracks()->count()); - $this->assertInstanceOf(PlaylistTrack::class, $playlist->tracks()->first()); + expect($playlist->tracks())->toBeInstanceOf(HasMany::class); + expect($playlist->tracks()->count())->toEqual($trackCount); + expect($playlist->tracks()->first())->toBeInstanceOf(PlaylistTrack::class); }); diff --git a/tests/Unit/Models/Wiki/AnimeTest.php b/tests/Unit/Models/Wiki/AnimeTest.php index 211351060..55340169e 100644 --- a/tests/Unit/Models/Wiki/AnimeTest.php +++ b/tests/Unit/Models/Wiki/AnimeTest.php @@ -21,44 +21,44 @@ use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('casts season to enum', function (): void { $anime = Anime::factory()->createOne(); $season = $anime->season; - $this->assertInstanceOf(AnimeSeason::class, $season); + expect($season)->toBeInstanceOf(AnimeSeason::class); }); test('casts format to enum', function (): void { $anime = Anime::factory()->createOne(); - $this->assertInstanceOf(AnimeFormat::class, $anime->format); + expect($anime->format)->toBeInstanceOf(AnimeFormat::class); }); test('searchable as', function (): void { $anime = Anime::factory()->createOne(); - $this->assertIsString($anime->searchableAs()); + expect($anime->searchableAs())->toBeString(); }); test('to searchable array', function (): void { $anime = Anime::factory()->createOne(); - $this->assertIsArray($anime->toSearchableArray()); + expect($anime->toSearchableArray())->toBeArray(); }); test('nameable', function (): void { $anime = Anime::factory()->createOne(); - $this->assertIsString($anime->getName()); + expect($anime->getName())->toBeString(); }); test('has subtitle', function (): void { $anime = Anime::factory()->createOne(); - $this->assertIsString($anime->getSubtitle()); + expect($anime->getSubtitle())->toBeString(); }); test('synonyms', function (): void { @@ -68,9 +68,9 @@ test('synonyms', function (): void { ->has(Synonym::factory()->count($synonymCount)) ->createOne(); - $this->assertInstanceOf(MorphMany::class, $anime->synonyms()); - $this->assertEquals($synonymCount, $anime->synonyms()->count()); - $this->assertInstanceOf(Synonym::class, $anime->synonyms()->first()); + expect($anime->synonyms())->toBeInstanceOf(MorphMany::class); + expect($anime->synonyms()->count())->toEqual($synonymCount); + expect($anime->synonyms()->first())->toBeInstanceOf(Synonym::class); }); test('series', function (): void { @@ -80,10 +80,10 @@ test('series', function (): void { ->has(Series::factory()->count($seriesCount)) ->createOne(); - $this->assertInstanceOf(BelongsToMany::class, $anime->series()); - $this->assertEquals($seriesCount, $anime->series()->count()); - $this->assertInstanceOf(Series::class, $anime->series()->first()); - $this->assertEquals(AnimeSeries::class, $anime->series()->getPivotClass()); + expect($anime->series())->toBeInstanceOf(BelongsToMany::class); + expect($anime->series()->count())->toEqual($seriesCount); + expect($anime->series()->first())->toBeInstanceOf(Series::class); + expect($anime->series()->getPivotClass())->toEqual(AnimeSeries::class); }); test('themes', function (): void { @@ -93,9 +93,9 @@ test('themes', function (): void { ->has(Theme::factory()->count($themeCount)) ->createOne(); - $this->assertInstanceOf(HasMany::class, $anime->themes()); - $this->assertEquals($themeCount, $anime->themes()->count()); - $this->assertInstanceOf(Theme::class, $anime->themes()->first()); + expect($anime->themes())->toBeInstanceOf(HasMany::class); + expect($anime->themes()->count())->toEqual($themeCount); + expect($anime->themes()->first())->toBeInstanceOf(Theme::class); }); test('external resources', function (): void { @@ -105,10 +105,10 @@ test('external resources', function (): void { ->has(ExternalResource::factory()->count($resourceCount), 'resources') ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $anime->resources()); - $this->assertEquals($resourceCount, $anime->resources()->count()); - $this->assertInstanceOf(ExternalResource::class, $anime->resources()->first()); - $this->assertEquals(Resourceable::class, $anime->resources()->getPivotClass()); + expect($anime->resources())->toBeInstanceOf(MorphToMany::class); + expect($anime->resources()->count())->toEqual($resourceCount); + expect($anime->resources()->first())->toBeInstanceOf(ExternalResource::class); + expect($anime->resources()->getPivotClass())->toEqual(Resourceable::class); }); test('images', function (): void { @@ -118,10 +118,10 @@ test('images', function (): void { ->has(Image::factory()->count($imageCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $anime->images()); - $this->assertEquals($imageCount, $anime->images()->count()); - $this->assertInstanceOf(Image::class, $anime->images()->first()); - $this->assertEquals(Imageable::class, $anime->images()->getPivotClass()); + expect($anime->images())->toBeInstanceOf(MorphToMany::class); + expect($anime->images()->count())->toEqual($imageCount); + expect($anime->images()->first())->toBeInstanceOf(Image::class); + expect($anime->images()->getPivotClass())->toEqual(Imageable::class); }); test('studios', function (): void { @@ -131,8 +131,8 @@ test('studios', function (): void { ->has(Studio::factory()->count($studioCount)) ->createOne(); - $this->assertInstanceOf(BelongsToMany::class, $anime->studios()); - $this->assertEquals($studioCount, $anime->studios()->count()); - $this->assertInstanceOf(Studio::class, $anime->studios()->first()); - $this->assertEquals(AnimeStudio::class, $anime->studios()->getPivotClass()); + expect($anime->studios())->toBeInstanceOf(BelongsToMany::class); + expect($anime->studios()->count())->toEqual($studioCount); + expect($anime->studios()->first())->toBeInstanceOf(Studio::class); + expect($anime->studios()->getPivotClass())->toEqual(AnimeStudio::class); }); diff --git a/tests/Unit/Models/Wiki/ArtistTest.php b/tests/Unit/Models/Wiki/ArtistTest.php index dcde86d85..ba3aa8c76 100644 --- a/tests/Unit/Models/Wiki/ArtistTest.php +++ b/tests/Unit/Models/Wiki/ArtistTest.php @@ -17,30 +17,30 @@ use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('searchable as', function (): void { $artist = Artist::factory()->createOne(); - $this->assertIsString($artist->searchableAs()); + expect($artist->searchableAs())->toBeString(); }); test('to searchable array', function (): void { $artist = Artist::factory()->createOne(); - $this->assertIsArray($artist->toSearchableArray()); + expect($artist->toSearchableArray())->toBeArray(); }); test('nameable', function (): void { $artist = Artist::factory()->createOne(); - $this->assertIsString($artist->getName()); + expect($artist->getName())->toBeString(); }); test('has subtitle', function (): void { $artist = Artist::factory()->createOne(); - $this->assertIsString($artist->getSubtitle()); + expect($artist->getSubtitle())->toBeString(); }); test('synonyms', function (): void { @@ -50,9 +50,9 @@ test('synonyms', function (): void { ->has(Synonym::factory()->count($synonymCount)) ->createOne(); - $this->assertInstanceOf(MorphMany::class, $artist->synonyms()); - $this->assertEquals($synonymCount, $artist->synonyms()->count()); - $this->assertInstanceOf(Synonym::class, $artist->synonyms()->first()); + expect($artist->synonyms())->toBeInstanceOf(MorphMany::class); + expect($artist->synonyms()->count())->toEqual($synonymCount); + expect($artist->synonyms()->first())->toBeInstanceOf(Synonym::class); }); test('songs', function (): void { @@ -62,9 +62,9 @@ test('songs', function (): void { ->has(Song::factory()->count($songCount)) ->createOne(); - $this->assertInstanceOf(BelongsToMany::class, $artist->songs()); - $this->assertEquals($songCount, $artist->songs()->count()); - $this->assertInstanceOf(Song::class, $artist->songs()->first()); + expect($artist->songs())->toBeInstanceOf(BelongsToMany::class); + expect($artist->songs()->count())->toEqual($songCount); + expect($artist->songs()->first())->toBeInstanceOf(Song::class); }); test('performances', function (): void { @@ -78,9 +78,9 @@ test('performances', function (): void { ->count($performanceCount) ->create(); - $this->assertInstanceOf(HasMany::class, $artist->performances()); - $this->assertEquals($performanceCount, $artist->performances()->count()); - $this->assertInstanceOf(Performance::class, $artist->performances()->first()); + expect($artist->performances())->toBeInstanceOf(HasMany::class); + expect($artist->performances()->count())->toEqual($performanceCount); + expect($artist->performances()->first())->toBeInstanceOf(Performance::class); }); test('member performances', function (): void { @@ -95,9 +95,9 @@ test('member performances', function (): void { ->count($performanceCount) ->create(); - $this->assertInstanceOf(HasMany::class, $member->memberPerformances()); - $this->assertEquals($performanceCount, $member->memberPerformances()->count()); - $this->assertInstanceOf(Performance::class, $member->memberPerformances()->first()); + expect($member->memberPerformances())->toBeInstanceOf(HasMany::class); + expect($member->memberPerformances()->count())->toEqual($performanceCount); + expect($member->memberPerformances()->first())->toBeInstanceOf(Performance::class); }); test('members', function (): void { @@ -107,10 +107,10 @@ test('members', function (): void { ->has(Artist::factory()->count($memberCount), Artist::RELATION_MEMBERS) ->createOne(); - $this->assertInstanceOf(BelongsToMany::class, $artist->members()); - $this->assertEquals($memberCount, $artist->members()->count()); - $this->assertInstanceOf(Artist::class, $artist->members()->first()); - $this->assertEquals(ArtistMember::class, $artist->members()->getPivotClass()); + expect($artist->members())->toBeInstanceOf(BelongsToMany::class); + expect($artist->members()->count())->toEqual($memberCount); + expect($artist->members()->first())->toBeInstanceOf(Artist::class); + expect($artist->members()->getPivotClass())->toEqual(ArtistMember::class); }); test('groups', function (): void { @@ -120,10 +120,10 @@ test('groups', function (): void { ->has(Artist::factory()->count($groupCount), Artist::RELATION_GROUPS) ->createOne(); - $this->assertInstanceOf(BelongsToMany::class, $artist->groups()); - $this->assertEquals($groupCount, $artist->groups()->count()); - $this->assertInstanceOf(Artist::class, $artist->groups()->first()); - $this->assertEquals(ArtistMember::class, $artist->groups()->getPivotClass()); + expect($artist->groups())->toBeInstanceOf(BelongsToMany::class); + expect($artist->groups()->count())->toEqual($groupCount); + expect($artist->groups()->first())->toBeInstanceOf(Artist::class); + expect($artist->groups()->getPivotClass())->toEqual(ArtistMember::class); }); test('images', function (): void { @@ -133,10 +133,10 @@ test('images', function (): void { ->has(Image::factory()->count($imageCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $artist->images()); - $this->assertEquals($imageCount, $artist->images()->count()); - $this->assertInstanceOf(Image::class, $artist->images()->first()); - $this->assertEquals(Imageable::class, $artist->images()->getPivotClass()); + expect($artist->images())->toBeInstanceOf(MorphToMany::class); + expect($artist->images()->count())->toEqual($imageCount); + expect($artist->images()->first())->toBeInstanceOf(Image::class); + expect($artist->images()->getPivotClass())->toEqual(Imageable::class); }); test('external resources', function (): void { @@ -146,8 +146,8 @@ test('external resources', function (): void { ->has(ExternalResource::factory()->count($resourceCount), 'resources') ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $artist->resources()); - $this->assertEquals($resourceCount, $artist->resources()->count()); - $this->assertInstanceOf(ExternalResource::class, $artist->resources()->first()); - $this->assertEquals(Resourceable::class, $artist->resources()->getPivotClass()); + expect($artist->resources())->toBeInstanceOf(MorphToMany::class); + expect($artist->resources()->count())->toEqual($resourceCount); + expect($artist->resources()->first())->toBeInstanceOf(ExternalResource::class); + expect($artist->resources()->getPivotClass())->toEqual(Resourceable::class); }); diff --git a/tests/Unit/Models/Wiki/AudioTest.php b/tests/Unit/Models/Wiki/AudioTest.php index 9fc8fb2cd..cdf970864 100644 --- a/tests/Unit/Models/Wiki/AudioTest.php +++ b/tests/Unit/Models/Wiki/AudioTest.php @@ -13,18 +13,18 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('nameable', function (): void { $audio = Audio::factory()->createOne(); - $this->assertIsString($audio->getName()); + expect($audio->getName())->toBeString(); }); test('has subtitle', function (): void { $audio = Audio::factory()->createOne(); - $this->assertIsString($audio->getSubtitle()); + expect($audio->getSubtitle())->toBeString(); }); test('videos', function (): void { @@ -34,9 +34,9 @@ test('videos', function (): void { ->has(Video::factory()->count($videoCount)) ->createOne(); - $this->assertInstanceOf(HasMany::class, $audio->videos()); - $this->assertEquals($videoCount, $audio->videos()->count()); - $this->assertInstanceOf(Video::class, $audio->videos()->first()); + expect($audio->videos())->toBeInstanceOf(HasMany::class); + expect($audio->videos()->count())->toEqual($videoCount); + expect($audio->videos()->first())->toBeInstanceOf(Video::class); }); test('audio storage deletion', function (): void { @@ -50,7 +50,7 @@ test('audio storage deletion', function (): void { $audio->delete(); - $this->assertTrue($fs->exists($audio->path)); + expect($fs->exists($audio->path))->toBeTrue(); }); test('audio storage force deletion', function (): void { @@ -66,5 +66,5 @@ test('audio storage force deletion', function (): void { $audio->forceDelete(); - $this->assertFalse($fs->exists($audio->path)); + expect($fs->exists($audio->path))->toBeFalse(); }); diff --git a/tests/Unit/Models/Wiki/EntryTest.php b/tests/Unit/Models/Wiki/EntryTest.php index a3dde2751..ca079a6fc 100644 --- a/tests/Unit/Models/Wiki/EntryTest.php +++ b/tests/Unit/Models/Wiki/EntryTest.php @@ -14,14 +14,14 @@ use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Foundation\Testing\WithFaker; use Znck\Eloquent\Relations\BelongsToThrough; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('searchable as', function (): void { $entry = Entry::factory() ->for(Theme::factory()->for(Anime::factory())) ->createOne(); - $this->assertIsString($entry->searchableAs()); + expect($entry->searchableAs())->toBeString(); }); test('to searchable array', function (): void { @@ -29,7 +29,7 @@ test('to searchable array', function (): void { ->for(Theme::factory()->for(Anime::factory())) ->createOne(); - $this->assertIsArray($entry->toSearchableArray()); + expect($entry->toSearchableArray())->toBeArray(); }); test('nameable', function (): void { @@ -37,7 +37,7 @@ test('nameable', function (): void { ->for(Theme::factory()->for(Anime::factory())) ->createOne(); - $this->assertIsString($entry->getName()); + expect($entry->getName())->toBeString(); }); test('has subtitle', function (): void { @@ -45,7 +45,7 @@ test('has subtitle', function (): void { ->for(Theme::factory()->for(Anime::factory())) ->createOne(); - $this->assertIsString($entry->getSubtitle()); + expect($entry->getSubtitle())->toBeString(); }); test('theme', function (): void { @@ -53,8 +53,8 @@ test('theme', function (): void { ->for(Theme::factory()->for(Anime::factory())) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $entry->theme()); - $this->assertInstanceOf(Theme::class, $entry->theme()->first()); + expect($entry->theme())->toBeInstanceOf(BelongsTo::class); + expect($entry->theme()->first())->toBeInstanceOf(Theme::class); }); test('external resources', function (): void { @@ -65,10 +65,10 @@ test('external resources', function (): void { ->has(ExternalResource::factory()->count($resourcesCount), Entry::RELATION_RESOURCES) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $entry->resources()); - $this->assertEquals($resourcesCount, $entry->resources()->count()); - $this->assertInstanceOf(ExternalResource::class, $entry->resources()->first()); - $this->assertEquals(Resourceable::class, $entry->resources()->getPivotClass()); + expect($entry->resources())->toBeInstanceOf(MorphToMany::class); + expect($entry->resources()->count())->toEqual($resourcesCount); + expect($entry->resources()->first())->toBeInstanceOf(ExternalResource::class); + expect($entry->resources()->getPivotClass())->toEqual(Resourceable::class); }); test('videos', function (): void { @@ -79,10 +79,10 @@ test('videos', function (): void { ->has(Video::factory()->count($videoCount)) ->createOne(); - $this->assertInstanceOf(BelongsToMany::class, $entry->videos()); - $this->assertEquals($videoCount, $entry->videos()->count()); - $this->assertInstanceOf(Video::class, $entry->videos()->first()); - $this->assertEquals(EntryVideo::class, $entry->videos()->getPivotClass()); + expect($entry->videos())->toBeInstanceOf(BelongsToMany::class); + expect($entry->videos()->count())->toEqual($videoCount); + expect($entry->videos()->first())->toBeInstanceOf(Video::class); + expect($entry->videos()->getPivotClass())->toEqual(EntryVideo::class); }); test('anime', function (): void { @@ -90,6 +90,6 @@ test('anime', function (): void { ->for(Theme::factory()->for(Anime::factory())) ->createOne(); - $this->assertInstanceOf(BelongsToThrough::class, $entry->anime()); - $this->assertInstanceOf(Anime::class, $entry->anime()->first()); + expect($entry->anime())->toBeInstanceOf(BelongsToThrough::class); + expect($entry->anime()->first())->toBeInstanceOf(Anime::class); }); diff --git a/tests/Unit/Models/Wiki/ExternalResourceTest.php b/tests/Unit/Models/Wiki/ExternalResourceTest.php index 2090c5630..5d9aa92ad 100644 --- a/tests/Unit/Models/Wiki/ExternalResourceTest.php +++ b/tests/Unit/Models/Wiki/ExternalResourceTest.php @@ -13,26 +13,26 @@ use App\Pivots\Morph\Resourceable; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('casts season to enum', function (): void { $resource = ExternalResource::factory()->createOne(); $site = $resource->site; - $this->assertInstanceOf(ResourceSite::class, $site); + expect($site)->toBeInstanceOf(ResourceSite::class); }); test('nameable', function (): void { $resource = ExternalResource::factory()->createOne(); - $this->assertIsString($resource->getName()); + expect($resource->getName())->toBeString(); }); test('has subtitle', function (): void { $resource = ExternalResource::factory()->createOne(); - $this->assertIsString($resource->getSubtitle()); + expect($resource->getSubtitle())->toBeString(); }); test('anime', function (): void { @@ -42,10 +42,10 @@ test('anime', function (): void { ->has(Anime::factory()->count($animeCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $resource->anime()); - $this->assertEquals($animeCount, $resource->anime()->count()); - $this->assertInstanceOf(Anime::class, $resource->anime()->first()); - $this->assertEquals(Resourceable::class, $resource->anime()->getPivotClass()); + expect($resource->anime())->toBeInstanceOf(MorphToMany::class); + expect($resource->anime()->count())->toEqual($animeCount); + expect($resource->anime()->first())->toBeInstanceOf(Anime::class); + expect($resource->anime()->getPivotClass())->toEqual(Resourceable::class); }); test('anime theme entry', function (): void { @@ -55,10 +55,10 @@ test('anime theme entry', function (): void { ->has(Entry::factory()->forAnime()->count($entryCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $resource->entries()); - $this->assertEquals($entryCount, $resource->entries()->count()); - $this->assertInstanceOf(Entry::class, $resource->entries()->first()); - $this->assertEquals(Resourceable::class, $resource->entries()->getPivotClass()); + expect($resource->entries())->toBeInstanceOf(MorphToMany::class); + expect($resource->entries()->count())->toEqual($entryCount); + expect($resource->entries()->first())->toBeInstanceOf(Entry::class); + expect($resource->entries()->getPivotClass())->toEqual(Resourceable::class); }); test('artists', function (): void { @@ -68,10 +68,10 @@ test('artists', function (): void { ->has(Artist::factory()->count($artistCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $resource->artists()); - $this->assertEquals($artistCount, $resource->artists()->count()); - $this->assertInstanceOf(Artist::class, $resource->artists()->first()); - $this->assertEquals(Resourceable::class, $resource->artists()->getPivotClass()); + expect($resource->artists())->toBeInstanceOf(MorphToMany::class); + expect($resource->artists()->count())->toEqual($artistCount); + expect($resource->artists()->first())->toBeInstanceOf(Artist::class); + expect($resource->artists()->getPivotClass())->toEqual(Resourceable::class); }); test('song', function (): void { @@ -81,10 +81,10 @@ test('song', function (): void { ->has(Song::factory()->count($songCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $resource->songs()); - $this->assertEquals($songCount, $resource->songs()->count()); - $this->assertInstanceOf(Song::class, $resource->songs()->first()); - $this->assertEquals(Resourceable::class, $resource->songs()->getPivotClass()); + expect($resource->songs())->toBeInstanceOf(MorphToMany::class); + expect($resource->songs()->count())->toEqual($songCount); + expect($resource->songs()->first())->toBeInstanceOf(Song::class); + expect($resource->songs()->getPivotClass())->toEqual(Resourceable::class); }); test('studio', function (): void { @@ -94,8 +94,8 @@ test('studio', function (): void { ->has(Studio::factory()->count($studioCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $resource->studios()); - $this->assertEquals($studioCount, $resource->studios()->count()); - $this->assertInstanceOf(Studio::class, $resource->studios()->first()); - $this->assertEquals(Resourceable::class, $resource->studios()->getPivotClass()); + expect($resource->studios())->toBeInstanceOf(MorphToMany::class); + expect($resource->studios()->count())->toEqual($studioCount); + expect($resource->studios()->first())->toBeInstanceOf(Studio::class); + expect($resource->studios()->getPivotClass())->toEqual(Resourceable::class); }); diff --git a/tests/Unit/Models/Wiki/GroupTest.php b/tests/Unit/Models/Wiki/GroupTest.php index 8a5172388..003e01a2b 100644 --- a/tests/Unit/Models/Wiki/GroupTest.php +++ b/tests/Unit/Models/Wiki/GroupTest.php @@ -8,18 +8,18 @@ use App\Models\Wiki\Theme; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('nameable', function (): void { $group = Group::factory()->createOne(); - $this->assertIsString($group->getName()); + expect($group->getName())->toBeString(); }); test('has subtitle', function (): void { $group = Group::factory()->createOne(); - $this->assertIsString($group->getSubtitle()); + expect($group->getSubtitle())->toBeString(); }); test('themes', function (): void { @@ -29,7 +29,7 @@ test('themes', function (): void { ->has(Theme::factory()->for(Anime::factory())->count($themeCount)) ->createOne(); - $this->assertInstanceOf(HasMany::class, $group->themes()); - $this->assertEquals($themeCount, $group->themes()->count()); - $this->assertInstanceOf(Theme::class, $group->themes()->first()); + expect($group->themes())->toBeInstanceOf(HasMany::class); + expect($group->themes()->count())->toEqual($themeCount); + expect($group->themes()->first())->toBeInstanceOf(Theme::class); }); diff --git a/tests/Unit/Models/Wiki/ImageTest.php b/tests/Unit/Models/Wiki/ImageTest.php index 7726e34ab..f33b4195e 100644 --- a/tests/Unit/Models/Wiki/ImageTest.php +++ b/tests/Unit/Models/Wiki/ImageTest.php @@ -18,26 +18,26 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('casts facet to enum', function (): void { $image = Image::factory()->createOne(); $facet = $image->facet; - $this->assertInstanceOf(ImageFacet::class, $facet); + expect($facet)->toBeInstanceOf(ImageFacet::class); }); test('nameable', function (): void { $image = Image::factory()->createOne(); - $this->assertIsString($image->getName()); + expect($image->getName())->toBeString(); }); test('has subtitle', function (): void { $image = Image::factory()->createOne(); - $this->assertIsString($image->getSubtitle()); + expect($image->getSubtitle())->toBeString(); }); test('anime', function (): void { @@ -47,10 +47,10 @@ test('anime', function (): void { ->has(Anime::factory()->count($animeCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $image->anime()); - $this->assertEquals($animeCount, $image->anime()->count()); - $this->assertInstanceOf(Anime::class, $image->anime()->first()); - $this->assertEquals(Imageable::class, $image->anime()->getPivotClass()); + expect($image->anime())->toBeInstanceOf(MorphToMany::class); + expect($image->anime()->count())->toEqual($animeCount); + expect($image->anime()->first())->toBeInstanceOf(Anime::class); + expect($image->anime()->getPivotClass())->toEqual(Imageable::class); }); test('artists', function (): void { @@ -60,10 +60,10 @@ test('artists', function (): void { ->has(Artist::factory()->count($artistCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $image->artists()); - $this->assertEquals($artistCount, $image->artists()->count()); - $this->assertInstanceOf(Artist::class, $image->artists()->first()); - $this->assertEquals(Imageable::class, $image->artists()->getPivotClass()); + expect($image->artists())->toBeInstanceOf(MorphToMany::class); + expect($image->artists()->count())->toEqual($artistCount); + expect($image->artists()->first())->toBeInstanceOf(Artist::class); + expect($image->artists()->getPivotClass())->toEqual(Imageable::class); }); test('studios', function (): void { @@ -73,10 +73,10 @@ test('studios', function (): void { ->has(Studio::factory()->count($studioCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $image->studios()); - $this->assertEquals($studioCount, $image->studios()->count()); - $this->assertInstanceOf(Studio::class, $image->studios()->first()); - $this->assertEquals(Imageable::class, $image->studios()->getPivotClass()); + expect($image->studios())->toBeInstanceOf(MorphToMany::class); + expect($image->studios()->count())->toEqual($studioCount); + expect($image->studios()->first())->toBeInstanceOf(Studio::class); + expect($image->studios()->getPivotClass())->toEqual(Imageable::class); }); test('playlists', function (): void { @@ -86,10 +86,10 @@ test('playlists', function (): void { ->has(Playlist::factory()->count($playlistCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $image->playlists()); - $this->assertEquals($playlistCount, $image->playlists()->count()); - $this->assertInstanceOf(Playlist::class, $image->playlists()->first()); - $this->assertEquals(Imageable::class, $image->playlists()->getPivotClass()); + expect($image->playlists())->toBeInstanceOf(MorphToMany::class); + expect($image->playlists()->count())->toEqual($playlistCount); + expect($image->playlists()->first())->toBeInstanceOf(Playlist::class); + expect($image->playlists()->getPivotClass())->toEqual(Imageable::class); }); test('image storage deletion', function (): void { @@ -106,7 +106,7 @@ test('image storage deletion', function (): void { $image->delete(); - $this->assertTrue($fs->exists($image->path)); + expect($fs->exists($image->path))->toBeTrue(); }); test('image storage force deletion', function (): void { @@ -125,5 +125,5 @@ test('image storage force deletion', function (): void { $image->forceDelete(); - $this->assertFalse($fs->exists($image->path)); + expect($fs->exists($image->path))->toBeFalse(); }); diff --git a/tests/Unit/Models/Wiki/PerformanceTest.php b/tests/Unit/Models/Wiki/PerformanceTest.php index 31a7467a7..6488f8365 100644 --- a/tests/Unit/Models/Wiki/PerformanceTest.php +++ b/tests/Unit/Models/Wiki/PerformanceTest.php @@ -8,18 +8,18 @@ use App\Models\Wiki\Song; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('nameable', function (): void { $performance = Performance::factory()->createOne(); - $this->assertIsString($performance->getName()); + expect($performance->getName())->toBeString(); }); test('has subtitle', function (): void { $performance = Performance::factory()->createOne(); - $this->assertIsString($performance->getSubtitle()); + expect($performance->getSubtitle())->toBeString(); }); test('song', function (): void { @@ -27,8 +27,8 @@ test('song', function (): void { ->for(Song::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $performance->song()); - $this->assertInstanceOf(Song::class, $performance->song()->first()); + expect($performance->song())->toBeInstanceOf(BelongsTo::class); + expect($performance->song()->first())->toBeInstanceOf(Song::class); }); test('artist', function (): void { @@ -36,8 +36,8 @@ test('artist', function (): void { ->for(Artist::factory()->createOne(), Performance::RELATION_ARTIST) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $performance->artist()); - $this->assertInstanceOf(Artist::class, $performance->artist()->first()); + expect($performance->artist())->toBeInstanceOf(BelongsTo::class); + expect($performance->artist()->first())->toBeInstanceOf(Artist::class); }); test('member', function (): void { @@ -46,6 +46,6 @@ test('member', function (): void { ->for(Artist::factory(), Performance::RELATION_MEMBER) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $performance->member()); - $this->assertInstanceOf(Artist::class, $performance->member()->first()); + expect($performance->member())->toBeInstanceOf(BelongsTo::class); + expect($performance->member()->first())->toBeInstanceOf(Artist::class); }); diff --git a/tests/Unit/Models/Wiki/SeriesTest.php b/tests/Unit/Models/Wiki/SeriesTest.php index 8e2569632..f12b9784a 100644 --- a/tests/Unit/Models/Wiki/SeriesTest.php +++ b/tests/Unit/Models/Wiki/SeriesTest.php @@ -8,30 +8,30 @@ use App\Pivots\Wiki\AnimeSeries; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('searchable as', function (): void { $series = Series::factory()->createOne(); - $this->assertIsString($series->searchableAs()); + expect($series->searchableAs())->toBeString(); }); test('to searchable array', function (): void { $series = Series::factory()->createOne(); - $this->assertIsArray($series->toSearchableArray()); + expect($series->toSearchableArray())->toBeArray(); }); test('nameable', function (): void { $series = Series::factory()->createOne(); - $this->assertIsString($series->getName()); + expect($series->getName())->toBeString(); }); test('has subtitle', function (): void { $series = Series::factory()->createOne(); - $this->assertIsString($series->getSubtitle()); + expect($series->getSubtitle())->toBeString(); }); test('anime', function (): void { @@ -41,8 +41,8 @@ test('anime', function (): void { ->has(Anime::factory()->count($animeCount)) ->createOne(); - $this->assertInstanceOf(BelongsToMany::class, $series->anime()); - $this->assertEquals($animeCount, $series->anime()->count()); - $this->assertInstanceOf(Anime::class, $series->anime()->first()); - $this->assertEquals(AnimeSeries::class, $series->anime()->getPivotClass()); + expect($series->anime())->toBeInstanceOf(BelongsToMany::class); + expect($series->anime()->count())->toEqual($animeCount); + expect($series->anime()->first())->toBeInstanceOf(Anime::class); + expect($series->anime()->getPivotClass())->toEqual(AnimeSeries::class); }); diff --git a/tests/Unit/Models/Wiki/SongTest.php b/tests/Unit/Models/Wiki/SongTest.php index 64a70724e..303d83613 100644 --- a/tests/Unit/Models/Wiki/SongTest.php +++ b/tests/Unit/Models/Wiki/SongTest.php @@ -14,24 +14,24 @@ use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('searchable as', function (): void { $song = Song::factory()->createOne(); - $this->assertIsString($song->searchableAs()); + expect($song->searchableAs())->toBeString(); }); test('to searchable array', function (): void { $song = Song::factory()->createOne(); - $this->assertIsArray($song->toSearchableArray()); + expect($song->toSearchableArray())->toBeArray(); }); test('nameable', function (): void { $song = Song::factory()->createOne(); - $this->assertIsString($song->getName()); + expect($song->getName())->toBeString(); }); test('has subtitle', function (): void { @@ -39,7 +39,7 @@ test('has subtitle', function (): void { ->has(Theme::factory()->for(Anime::factory())) ->createOne(); - $this->assertIsString($song->getSubtitle()); + expect($song->getSubtitle())->toBeString(); }); test('themes', function (): void { @@ -49,9 +49,9 @@ test('themes', function (): void { ->has(Theme::factory()->for(Anime::factory())->count($themeCount)) ->createOne(); - $this->assertInstanceOf(HasMany::class, $song->themes()); - $this->assertEquals($themeCount, $song->themes()->count()); - $this->assertInstanceOf(Theme::class, $song->themes()->first()); + expect($song->themes())->toBeInstanceOf(HasMany::class); + expect($song->themes()->count())->toEqual($themeCount); + expect($song->themes()->first())->toBeInstanceOf(Theme::class); }); test('artists', function (): void { @@ -61,9 +61,9 @@ test('artists', function (): void { ->has(Artist::factory()->count($artistCount)) ->createOne(); - $this->assertInstanceOf(BelongsToMany::class, $song->artists()); - $this->assertEquals($artistCount, $song->artists()->count()); - $this->assertInstanceOf(Artist::class, $song->artists()->first()); + expect($song->artists())->toBeInstanceOf(BelongsToMany::class); + expect($song->artists()->count())->toEqual($artistCount); + expect($song->artists()->first())->toBeInstanceOf(Artist::class); }); test('performances', function (): void { @@ -73,9 +73,9 @@ test('performances', function (): void { ->has(Performance::factory()->count($performanceCount)) ->createOne(); - $this->assertInstanceOf(HasMany::class, $song->performances()); - $this->assertEquals($performanceCount, $song->performances()->count()); - $this->assertInstanceOf(Performance::class, $song->performances()->first()); + expect($song->performances())->toBeInstanceOf(HasMany::class); + expect($song->performances()->count())->toEqual($performanceCount); + expect($song->performances()->first())->toBeInstanceOf(Performance::class); }); test('external resources', function (): void { @@ -85,8 +85,8 @@ test('external resources', function (): void { ->has(ExternalResource::factory()->count($resourceCount), 'resources') ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $song->resources()); - $this->assertEquals($resourceCount, $song->resources()->count()); - $this->assertInstanceOf(ExternalResource::class, $song->resources()->first()); - $this->assertEquals(Resourceable::class, $song->resources()->getPivotClass()); + expect($song->resources())->toBeInstanceOf(MorphToMany::class); + expect($song->resources()->count())->toEqual($resourceCount); + expect($song->resources()->first())->toBeInstanceOf(ExternalResource::class); + expect($song->resources()->getPivotClass())->toEqual(Resourceable::class); }); diff --git a/tests/Unit/Models/Wiki/StudioTest.php b/tests/Unit/Models/Wiki/StudioTest.php index 618b926d9..2aa8ca99d 100644 --- a/tests/Unit/Models/Wiki/StudioTest.php +++ b/tests/Unit/Models/Wiki/StudioTest.php @@ -13,30 +13,30 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('searchable as', function (): void { $studio = Studio::factory()->createOne(); - $this->assertIsString($studio->searchableAs()); + expect($studio->searchableAs())->toBeString(); }); test('to searchable array', function (): void { $studio = Studio::factory()->createOne(); - $this->assertIsArray($studio->toSearchableArray()); + expect($studio->toSearchableArray())->toBeArray(); }); test('nameable', function (): void { $studio = Studio::factory()->createOne(); - $this->assertIsString($studio->getName()); + expect($studio->getName())->toBeString(); }); test('has subtitle', function (): void { $studio = Studio::factory()->createOne(); - $this->assertIsString($studio->getSubtitle()); + expect($studio->getSubtitle())->toBeString(); }); test('anime', function (): void { @@ -46,10 +46,10 @@ test('anime', function (): void { ->has(Anime::factory()->count($animeCount)) ->createOne(); - $this->assertInstanceOf(BelongsToMany::class, $studio->anime()); - $this->assertEquals($animeCount, $studio->anime()->count()); - $this->assertInstanceOf(Anime::class, $studio->anime()->first()); - $this->assertEquals(AnimeStudio::class, $studio->anime()->getPivotClass()); + expect($studio->anime())->toBeInstanceOf(BelongsToMany::class); + expect($studio->anime()->count())->toEqual($animeCount); + expect($studio->anime()->first())->toBeInstanceOf(Anime::class); + expect($studio->anime()->getPivotClass())->toEqual(AnimeStudio::class); }); test('external resources', function (): void { @@ -59,10 +59,10 @@ test('external resources', function (): void { ->has(ExternalResource::factory()->count($resourceCount), 'resources') ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $studio->resources()); - $this->assertEquals($resourceCount, $studio->resources()->count()); - $this->assertInstanceOf(ExternalResource::class, $studio->resources()->first()); - $this->assertEquals(Resourceable::class, $studio->resources()->getPivotClass()); + expect($studio->resources())->toBeInstanceOf(MorphToMany::class); + expect($studio->resources()->count())->toEqual($resourceCount); + expect($studio->resources()->first())->toBeInstanceOf(ExternalResource::class); + expect($studio->resources()->getPivotClass())->toEqual(Resourceable::class); }); test('images', function (): void { @@ -72,8 +72,8 @@ test('images', function (): void { ->has(Image::factory()->count($imageCount)) ->createOne(); - $this->assertInstanceOf(MorphToMany::class, $studio->images()); - $this->assertEquals($imageCount, $studio->images()->count()); - $this->assertInstanceOf(Image::class, $studio->images()->first()); - $this->assertEquals(Imageable::class, $studio->images()->getPivotClass()); + expect($studio->images())->toBeInstanceOf(MorphToMany::class); + expect($studio->images()->count())->toEqual($imageCount); + expect($studio->images()->first())->toBeInstanceOf(Image::class); + expect($studio->images()->getPivotClass())->toEqual(Imageable::class); }); diff --git a/tests/Unit/Models/Wiki/ThemeTest.php b/tests/Unit/Models/Wiki/ThemeTest.php index 2fdf51439..6ce8ceadd 100644 --- a/tests/Unit/Models/Wiki/ThemeTest.php +++ b/tests/Unit/Models/Wiki/ThemeTest.php @@ -12,7 +12,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Foundation\Testing\WithFaker; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('casts type to enum', function (): void { $theme = Theme::factory() @@ -21,7 +21,7 @@ test('casts type to enum', function (): void { $type = $theme->type; - $this->assertInstanceOf(ThemeType::class, $type); + expect($type)->toBeInstanceOf(ThemeType::class); }); test('searchable as', function (): void { @@ -29,7 +29,7 @@ test('searchable as', function (): void { ->for(Anime::factory()) ->createOne(); - $this->assertIsString($theme->searchableAs()); + expect($theme->searchableAs())->toBeString(); }); test('to searchable array', function (): void { @@ -37,7 +37,7 @@ test('to searchable array', function (): void { ->for(Anime::factory()) ->createOne(); - $this->assertIsArray($theme->toSearchableArray()); + expect($theme->toSearchableArray())->toBeArray(); }); test('nameable', function (): void { @@ -45,7 +45,7 @@ test('nameable', function (): void { ->for(Anime::factory()) ->createOne(); - $this->assertIsString($theme->getName()); + expect($theme->getName())->toBeString(); }); test('has subtitle', function (): void { @@ -53,7 +53,7 @@ test('has subtitle', function (): void { ->for(Anime::factory()) ->createOne(); - $this->assertIsString($theme->getSubtitle()); + expect($theme->getSubtitle())->toBeString(); }); test('anime', function (): void { @@ -61,8 +61,8 @@ test('anime', function (): void { ->for(Anime::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $theme->anime()); - $this->assertInstanceOf(Anime::class, $theme->anime()->first()); + expect($theme->anime())->toBeInstanceOf(BelongsTo::class); + expect($theme->anime()->first())->toBeInstanceOf(Anime::class); }); test('group', function (): void { @@ -71,8 +71,8 @@ test('group', function (): void { ->for(Group::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $theme->group()); - $this->assertInstanceOf(Group::class, $theme->group()->first()); + expect($theme->group())->toBeInstanceOf(BelongsTo::class); + expect($theme->group()->first())->toBeInstanceOf(Group::class); }); test('song', function (): void { @@ -81,8 +81,8 @@ test('song', function (): void { ->for(Song::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $theme->song()); - $this->assertInstanceOf(Song::class, $theme->song()->first()); + expect($theme->song())->toBeInstanceOf(BelongsTo::class); + expect($theme->song()->first())->toBeInstanceOf(Song::class); }); test('entries', function (): void { @@ -93,9 +93,9 @@ test('entries', function (): void { ->has(Entry::factory()->count($entryCount)) ->createOne(); - $this->assertInstanceOf(HasMany::class, $theme->entries()); - $this->assertEquals($entryCount, $theme->entries()->count()); - $this->assertInstanceOf(Entry::class, $theme->entries()->first()); + expect($theme->entries())->toBeInstanceOf(HasMany::class); + expect($theme->entries()->count())->toEqual($entryCount); + expect($theme->entries()->first())->toBeInstanceOf(Entry::class); }); test('theme creates slug', function (): void { @@ -103,5 +103,5 @@ test('theme creates slug', function (): void { ->for(Anime::factory()) ->createOne(); - $this->assertArrayHasKey('slug', $theme); + expect($theme)->toHaveKey('slug'); }); diff --git a/tests/Unit/Models/Wiki/Video/ScriptTest.php b/tests/Unit/Models/Wiki/Video/ScriptTest.php index 0b3eaa88b..560c27bbc 100644 --- a/tests/Unit/Models/Wiki/Video/ScriptTest.php +++ b/tests/Unit/Models/Wiki/Video/ScriptTest.php @@ -13,12 +13,12 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('nameable', function (): void { $script = VideoScript::factory()->createOne(); - $this->assertIsString($script->getName()); + expect($script->getName())->toBeString(); }); test('has subtitle', function (): void { @@ -26,7 +26,7 @@ test('has subtitle', function (): void { ->for(Video::factory()) ->createOne(); - $this->assertIsString($script->getSubtitle()); + expect($script->getSubtitle())->toBeString(); }); test('video', function (): void { @@ -34,8 +34,8 @@ test('video', function (): void { ->for(Video::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $script->video()); - $this->assertInstanceOf(Video::class, $script->video()->first()); + expect($script->video())->toBeInstanceOf(BelongsTo::class); + expect($script->video()->first())->toBeInstanceOf(Video::class); }); test('script storage deletion', function (): void { @@ -49,7 +49,7 @@ test('script storage deletion', function (): void { $script->delete(); - $this->assertTrue($fs->exists($script->path)); + expect($fs->exists($script->path))->toBeTrue(); }); test('script storage force deletion', function (): void { @@ -65,5 +65,5 @@ test('script storage force deletion', function (): void { $script->forceDelete(); - $this->assertFalse($fs->exists($script->path)); + expect($fs->exists($script->path))->toBeFalse(); }); diff --git a/tests/Unit/Models/Wiki/VideoTest.php b/tests/Unit/Models/Wiki/VideoTest.php index 4a36aa0ac..734c53cbe 100644 --- a/tests/Unit/Models/Wiki/VideoTest.php +++ b/tests/Unit/Models/Wiki/VideoTest.php @@ -27,14 +27,14 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Event; use Illuminate\Support\Facades\Storage; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('casts overlap to enum', function (): void { $video = Video::factory()->createOne(); $overlap = $video->overlap; - $this->assertInstanceOf(VideoOverlap::class, $overlap); + expect($overlap)->toBeInstanceOf(VideoOverlap::class); }); test('casts source to enum', function (): void { @@ -42,37 +42,37 @@ test('casts source to enum', function (): void { $source = $video->source; - $this->assertInstanceOf(VideoSource::class, $source); + expect($source)->toBeInstanceOf(VideoSource::class); }); test('searchable as', function (): void { $video = Video::factory()->createOne(); - $this->assertIsString($video->searchableAs()); + expect($video->searchableAs())->toBeString(); }); test('to searchable array', function (): void { $video = Video::factory()->createOne(); - $this->assertIsArray($video->toSearchableArray()); + expect($video->toSearchableArray())->toBeArray(); }); test('nameable', function (): void { $video = Video::factory()->createOne(); - $this->assertIsString($video->getName()); + expect($video->getName())->toBeString(); }); test('has subtitle', function (): void { $video = Video::factory()->createOne(); - $this->assertIsString($video->getSubtitle()); + expect($video->getSubtitle())->toBeString(); }); test('appends tags', function (): void { $video = Video::factory()->createOne(); - $this->assertArrayHasKey(Video::ATTRIBUTE_TAGS, $video); + expect($video)->toHaveKey(Video::ATTRIBUTE_TAGS); }); test('nc tag', function (): void { @@ -80,7 +80,7 @@ test('nc tag', function (): void { Video::ATTRIBUTE_NC => true, ]); - $this->assertStringContainsString('NC', $video->tags); + expect($video->tags)->toContain('NC'); }); test('no nc tag', function (): void { @@ -88,7 +88,7 @@ test('no nc tag', function (): void { Video::ATTRIBUTE_NC => false, ]); - $this->assertStringNotContainsString('NC', $video->tags); + expect($video->tags)->not->toContain('NC'); }); test('dvd tag', function (): void { @@ -98,7 +98,7 @@ test('dvd tag', function (): void { Video::ATTRIBUTE_SOURCE => $source->value, ]); - $this->assertStringContainsString($source->localize(), $video->tags); + expect($video->tags)->toContain($source->localize()); }); test('bd tag', function (): void { @@ -108,7 +108,7 @@ test('bd tag', function (): void { Video::ATTRIBUTE_SOURCE => $source->value, ]); - $this->assertStringContainsString($source->localize(), $video->tags); + expect($video->tags)->toContain($source->localize()); }); test('other source tag', function (): void { @@ -124,13 +124,13 @@ test('other source tag', function (): void { Video::ATTRIBUTE_SOURCE => $source->value, ]); - $this->assertStringNotContainsString($source->localize(), $video->tags); + expect($video->tags)->not->toContain($source->localize()); }); test('resolution tag', function (): void { $video = Video::factory()->createOne(); - $this->assertStringContainsString(strval($video->resolution), $video->tags); + expect($video->tags)->toContain(strval($video->resolution)); }); test('no720 resolution tag', function (): void { @@ -138,7 +138,7 @@ test('no720 resolution tag', function (): void { Video::ATTRIBUTE_RESOLUTION => 720, ]); - $this->assertStringNotContainsString(strval($video->resolution), $video->tags); + expect($video->tags)->not->toContain(strval($video->resolution)); }); test('subbed tag', function (): void { @@ -146,8 +146,8 @@ test('subbed tag', function (): void { Video::ATTRIBUTE_SUBBED => true, ]); - $this->assertStringContainsString('Subbed', $video->tags); - $this->assertStringNotContainsString('Lyrics', $video->tags); + expect($video->tags)->toContain('Subbed'); + expect($video->tags)->not->toContain('Lyrics'); }); test('lyrics tag', function (): void { @@ -156,8 +156,8 @@ test('lyrics tag', function (): void { Video::ATTRIBUTE_LYRICS => true, ]); - $this->assertStringNotContainsString('Subbed', $video->tags); - $this->assertStringContainsString('Lyrics', $video->tags); + expect($video->tags)->not->toContain('Subbed'); + expect($video->tags)->toContain('Lyrics'); }); test('source priority', function (array $a, array $b): void { @@ -165,7 +165,7 @@ test('source priority', function (array $a, array $b): void { $second = Video::factory()->createOne($b); - $this->assertGreaterThan($first->getAttribute(Video::ATTRIBUTE_PRIORITY), $second->getAttribute(Video::ATTRIBUTE_PRIORITY)); + expect($second->getAttribute(Video::ATTRIBUTE_PRIORITY))->toBeGreaterThan($first->getAttribute(Video::ATTRIBUTE_PRIORITY)); })->with('priorityProvider'); test('entries', function (): void { $entryCount = fake()->randomDigitNotNull(); @@ -174,10 +174,10 @@ test('entries', function (): void { ->has(Entry::factory()->for(Theme::factory()->for(Anime::factory()))->count($entryCount)) ->createOne(); - $this->assertInstanceOf(BelongsToMany::class, $video->entries()); - $this->assertEquals($entryCount, $video->entries()->count()); - $this->assertInstanceOf(Entry::class, $video->entries()->first()); - $this->assertEquals(EntryVideo::class, $video->entries()->getPivotClass()); + expect($video->entries())->toBeInstanceOf(BelongsToMany::class); + expect($video->entries()->count())->toEqual($entryCount); + expect($video->entries()->first())->toBeInstanceOf(Entry::class); + expect($video->entries()->getPivotClass())->toEqual(EntryVideo::class); }); test('audio', function (): void { @@ -185,8 +185,8 @@ test('audio', function (): void { ->for(Audio::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $video->audio()); - $this->assertInstanceOf(Audio::class, $video->audio()->first()); + expect($video->audio())->toBeInstanceOf(BelongsTo::class); + expect($video->audio()->first())->toBeInstanceOf(Audio::class); }); test('tracks public', function (): void { @@ -197,9 +197,9 @@ test('tracks public', function (): void { ->has(PlaylistTrack::factory()->for($playlist)->count($trackCount), Video::RELATION_TRACKS) ->createOne(); - $this->assertInstanceOf(HasMany::class, $video->tracks()); - $this->assertEquals($trackCount, $video->tracks()->count()); - $this->assertInstanceOf(PlaylistTrack::class, $video->tracks()->first()); + expect($video->tracks())->toBeInstanceOf(HasMany::class); + expect($video->tracks()->count())->toEqual($trackCount); + expect($video->tracks()->first())->toBeInstanceOf(PlaylistTrack::class); }); test('tracks not public', function (): void { @@ -211,8 +211,8 @@ test('tracks not public', function (): void { ->has(PlaylistTrack::factory()->for($playlist)->count($trackCount), Video::RELATION_TRACKS) ->createOne(); - $this->assertInstanceOf(HasMany::class, $video->tracks()); - $this->assertNotEquals($trackCount, $video->tracks()->count()); + expect($video->tracks())->toBeInstanceOf(HasMany::class); + expect($video->tracks()->count())->not->toEqual($trackCount); }); test('script', function (): void { @@ -220,8 +220,8 @@ test('script', function (): void { ->has(VideoScript::factory(), Video::RELATION_SCRIPT) ->createOne(); - $this->assertInstanceOf(HasOne::class, $video->videoscript()); - $this->assertInstanceOf(VideoScript::class, $video->videoscript()->first()); + expect($video->videoscript())->toBeInstanceOf(HasOne::class); + expect($video->videoscript()->first())->toBeInstanceOf(VideoScript::class); }); /** * Provider for source priority testing. @@ -306,7 +306,7 @@ test('video storage deletion', function (): void { $video->delete(); - $this->assertTrue($fs->exists($video->path)); + expect($fs->exists($video->path))->toBeTrue(); }); test('video storage force deletion', function (): void { @@ -322,5 +322,5 @@ test('video storage force deletion', function (): void { $video->forceDelete(); - $this->assertFalse($fs->exists($video->path)); + expect($fs->exists($video->path))->toBeFalse(); }); diff --git a/tests/Unit/Notifications/DiscordNotificationTest.php b/tests/Unit/Notifications/DiscordNotificationTest.php index d4944113a..42c5a6cee 100644 --- a/tests/Unit/Notifications/DiscordNotificationTest.php +++ b/tests/Unit/Notifications/DiscordNotificationTest.php @@ -12,7 +12,7 @@ test('via discord message', function (): void { $notification = new DiscordNotification($message); - $this->assertEquals([DiscordChannel::class], $notification->via(new AnonymousNotifiable())); + expect($notification->via(new AnonymousNotifiable()))->toEqual([DiscordChannel::class]); }); test('to discord message', function (): void { @@ -20,5 +20,5 @@ test('to discord message', function (): void { $notification = new DiscordNotification($message); - $this->assertInstanceOf(DiscordMessage::class, $notification->toDiscord(new AnonymousNotifiable())); + expect($notification->toDiscord(new AnonymousNotifiable()))->toBeInstanceOf(DiscordMessage::class); }); diff --git a/tests/Unit/Pivots/Morph/ImageableTest.php b/tests/Unit/Pivots/Morph/ImageableTest.php index 5c0ff582f..f5ed24d5c 100644 --- a/tests/Unit/Pivots/Morph/ImageableTest.php +++ b/tests/Unit/Pivots/Morph/ImageableTest.php @@ -17,8 +17,8 @@ test('image', function (): void { ->forAnime() ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $imageable->image()); - $this->assertInstanceOf(Image::class, $imageable->image()->first()); + expect($imageable->image())->toBeInstanceOf(BelongsTo::class); + expect($imageable->image()->first())->toBeInstanceOf(Image::class); }); test('imageable playlist', function (): void { @@ -27,8 +27,8 @@ test('imageable playlist', function (): void { ->forPlaylist() ->createOne(); - $this->assertInstanceOf(MorphTo::class, $imageable->imageable()); - $this->assertInstanceOf(Playlist::class, $imageable->imageable()->first()); + expect($imageable->imageable())->toBeInstanceOf(MorphTo::class); + expect($imageable->imageable()->first())->toBeInstanceOf(Playlist::class); }); test('imageable anime', function (): void { @@ -37,8 +37,8 @@ test('imageable anime', function (): void { ->forAnime() ->createOne(); - $this->assertInstanceOf(MorphTo::class, $imageable->imageable()); - $this->assertInstanceOf(Anime::class, $imageable->imageable()->first()); + expect($imageable->imageable())->toBeInstanceOf(MorphTo::class); + expect($imageable->imageable()->first())->toBeInstanceOf(Anime::class); }); test('imageable artist', function (): void { @@ -47,8 +47,8 @@ test('imageable artist', function (): void { ->forArtist() ->createOne(); - $this->assertInstanceOf(MorphTo::class, $imageable->imageable()); - $this->assertInstanceOf(Artist::class, $imageable->imageable()->first()); + expect($imageable->imageable())->toBeInstanceOf(MorphTo::class); + expect($imageable->imageable()->first())->toBeInstanceOf(Artist::class); }); test('imageable studio', function (): void { @@ -57,6 +57,6 @@ test('imageable studio', function (): void { ->forStudio() ->createOne(); - $this->assertInstanceOf(MorphTo::class, $imageable->imageable()); - $this->assertInstanceOf(Studio::class, $imageable->imageable()->first()); + expect($imageable->imageable())->toBeInstanceOf(MorphTo::class); + expect($imageable->imageable()->first())->toBeInstanceOf(Studio::class); }); diff --git a/tests/Unit/Pivots/Morph/ResourceableTest.php b/tests/Unit/Pivots/Morph/ResourceableTest.php index 4ffea7ee2..69161f522 100644 --- a/tests/Unit/Pivots/Morph/ResourceableTest.php +++ b/tests/Unit/Pivots/Morph/ResourceableTest.php @@ -17,8 +17,8 @@ test('resource', function (): void { ->for(Anime::factory(), Resourceable::RELATION_RESOURCEABLE) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $resourceable->resource()); - $this->assertInstanceOf(ExternalResource::class, $resourceable->resource()->first()); + expect($resourceable->resource())->toBeInstanceOf(BelongsTo::class); + expect($resourceable->resource()->first())->toBeInstanceOf(ExternalResource::class); }); test('resourceable anime', function (): void { @@ -27,8 +27,8 @@ test('resourceable anime', function (): void { ->forAnime() ->createOne(); - $this->assertInstanceOf(MorphTo::class, $resourceable->resourceable()); - $this->assertInstanceOf(Anime::class, $resourceable->resourceable()->first()); + expect($resourceable->resourceable())->toBeInstanceOf(MorphTo::class); + expect($resourceable->resourceable()->first())->toBeInstanceOf(Anime::class); }); test('resourceable artist', function (): void { @@ -37,8 +37,8 @@ test('resourceable artist', function (): void { ->forArtist() ->createOne(); - $this->assertInstanceOf(MorphTo::class, $resourceable->resourceable()); - $this->assertInstanceOf(Artist::class, $resourceable->resourceable()->first()); + expect($resourceable->resourceable())->toBeInstanceOf(MorphTo::class); + expect($resourceable->resourceable()->first())->toBeInstanceOf(Artist::class); }); test('resourceable song', function (): void { @@ -47,8 +47,8 @@ test('resourceable song', function (): void { ->forSong() ->createOne(); - $this->assertInstanceOf(MorphTo::class, $resourceable->resourceable()); - $this->assertInstanceOf(Song::class, $resourceable->resourceable()->first()); + expect($resourceable->resourceable())->toBeInstanceOf(MorphTo::class); + expect($resourceable->resourceable()->first())->toBeInstanceOf(Song::class); }); test('resourceable studio', function (): void { @@ -57,6 +57,6 @@ test('resourceable studio', function (): void { ->forStudio() ->createOne(); - $this->assertInstanceOf(MorphTo::class, $resourceable->resourceable()); - $this->assertInstanceOf(Studio::class, $resourceable->resourceable()->first()); + expect($resourceable->resourceable())->toBeInstanceOf(MorphTo::class); + expect($resourceable->resourceable()->first())->toBeInstanceOf(Studio::class); }); diff --git a/tests/Unit/Pivots/Wiki/AnimeSeriesTest.php b/tests/Unit/Pivots/Wiki/AnimeSeriesTest.php index edf7123bd..e5b9772b1 100644 --- a/tests/Unit/Pivots/Wiki/AnimeSeriesTest.php +++ b/tests/Unit/Pivots/Wiki/AnimeSeriesTest.php @@ -13,8 +13,8 @@ test('anime', function (): void { ->for(Series::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $animeSeries->anime()); - $this->assertInstanceOf(Anime::class, $animeSeries->anime()->first()); + expect($animeSeries->anime())->toBeInstanceOf(BelongsTo::class); + expect($animeSeries->anime()->first())->toBeInstanceOf(Anime::class); }); test('series', function (): void { @@ -23,6 +23,6 @@ test('series', function (): void { ->for(Series::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $animeSeries->series()); - $this->assertInstanceOf(Series::class, $animeSeries->series()->first()); + expect($animeSeries->series())->toBeInstanceOf(BelongsTo::class); + expect($animeSeries->series()->first())->toBeInstanceOf(Series::class); }); diff --git a/tests/Unit/Pivots/Wiki/AnimeStudioTest.php b/tests/Unit/Pivots/Wiki/AnimeStudioTest.php index d3af0cd3f..d2dd15d7d 100644 --- a/tests/Unit/Pivots/Wiki/AnimeStudioTest.php +++ b/tests/Unit/Pivots/Wiki/AnimeStudioTest.php @@ -13,8 +13,8 @@ test('anime', function (): void { ->for(Studio::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $animeStudio->anime()); - $this->assertInstanceOf(Anime::class, $animeStudio->anime()->first()); + expect($animeStudio->anime())->toBeInstanceOf(BelongsTo::class); + expect($animeStudio->anime()->first())->toBeInstanceOf(Anime::class); }); test('studio', function (): void { @@ -23,6 +23,6 @@ test('studio', function (): void { ->for(Studio::factory()) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $animeStudio->studio()); - $this->assertInstanceOf(Studio::class, $animeStudio->studio()->first()); + expect($animeStudio->studio())->toBeInstanceOf(BelongsTo::class); + expect($animeStudio->studio()->first())->toBeInstanceOf(Studio::class); }); diff --git a/tests/Unit/Pivots/Wiki/ArtistMemberTest.php b/tests/Unit/Pivots/Wiki/ArtistMemberTest.php index 76c358c2c..7ece1b2c0 100644 --- a/tests/Unit/Pivots/Wiki/ArtistMemberTest.php +++ b/tests/Unit/Pivots/Wiki/ArtistMemberTest.php @@ -12,8 +12,8 @@ test('artist', function (): void { ->for(Artist::factory(), 'member') ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $artistMember->artist()); - $this->assertInstanceOf(Artist::class, $artistMember->artist()->first()); + expect($artistMember->artist())->toBeInstanceOf(BelongsTo::class); + expect($artistMember->artist()->first())->toBeInstanceOf(Artist::class); }); test('member', function (): void { @@ -22,6 +22,6 @@ test('member', function (): void { ->for(Artist::factory(), 'member') ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $artistMember->member()); - $this->assertInstanceOf(Artist::class, $artistMember->member()->first()); + expect($artistMember->member())->toBeInstanceOf(BelongsTo::class); + expect($artistMember->member()->first())->toBeInstanceOf(Artist::class); }); diff --git a/tests/Unit/Pivots/Wiki/EntryVideoTest.php b/tests/Unit/Pivots/Wiki/EntryVideoTest.php index bcf3c3c7e..b01619f53 100644 --- a/tests/Unit/Pivots/Wiki/EntryVideoTest.php +++ b/tests/Unit/Pivots/Wiki/EntryVideoTest.php @@ -15,8 +15,8 @@ test('video', function (): void { ->for(Entry::factory()->for(Theme::factory()->for(Anime::factory()))) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $entryVideo->video()); - $this->assertInstanceOf(Video::class, $entryVideo->video()->first()); + expect($entryVideo->video())->toBeInstanceOf(BelongsTo::class); + expect($entryVideo->video()->first())->toBeInstanceOf(Video::class); }); test('entry', function (): void { @@ -25,6 +25,6 @@ test('entry', function (): void { ->for(Entry::factory()->for(Theme::factory()->for(Anime::factory()))) ->createOne(); - $this->assertInstanceOf(BelongsTo::class, $entryVideo->entry()); - $this->assertInstanceOf(Entry::class, $entryVideo->entry()->first()); + expect($entryVideo->entry())->toBeInstanceOf(BelongsTo::class); + expect($entryVideo->entry()->first())->toBeInstanceOf(Entry::class); }); diff --git a/tests/Unit/Rules/Api/DelimitedTest.php b/tests/Unit/Rules/Api/DelimitedTest.php index 135b625d7..59428fc82 100644 --- a/tests/Unit/Rules/Api/DelimitedTest.php +++ b/tests/Unit/Rules/Api/DelimitedTest.php @@ -6,7 +6,7 @@ use App\Rules\Api\DelimitedRule; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('passes if all values pass', function (): void { $attribute = fake()->word(); @@ -18,7 +18,7 @@ test('passes if all values pass', function (): void { [$attribute => new DelimitedRule(['required', 'string'])] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails for duplicate values', function (): void { @@ -33,7 +33,7 @@ test('fails for duplicate values', function (): void { [$attribute => new DelimitedRule(['required', 'string'])] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('fails for invalid value', function (): void { @@ -46,7 +46,7 @@ test('fails for invalid value', function (): void { [$attribute => new DelimitedRule(['required', 'integer'])] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('validates empty values', function (): void { @@ -59,5 +59,5 @@ test('validates empty values', function (): void { [$attribute => new DelimitedRule(['required', 'string'])] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Api/DistinctIgnoringDirectionTest.php b/tests/Unit/Rules/Api/DistinctIgnoringDirectionTest.php index e92a4db04..ed5e0181b 100644 --- a/tests/Unit/Rules/Api/DistinctIgnoringDirectionTest.php +++ b/tests/Unit/Rules/Api/DistinctIgnoringDirectionTest.php @@ -8,7 +8,7 @@ use App\Rules\Api\DistinctIgnoringDirectionRule; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails if duplicate sort', function (): void { $key = fake()->word(); @@ -22,7 +22,7 @@ test('fails if duplicate sort', function (): void { [$attribute => new DistinctIgnoringDirectionRule()] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('fails if duplicate sort different direction', function (): void { @@ -43,7 +43,7 @@ test('fails if duplicate sort different direction', function (): void { [$attribute => new DistinctIgnoringDirectionRule()] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('passes if no duplicates', function (): void { @@ -56,5 +56,5 @@ test('passes if no duplicates', function (): void { [$attribute => new DistinctIgnoringDirectionRule()] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); diff --git a/tests/Unit/Rules/Api/EnumLocalizedNameTest.php b/tests/Unit/Rules/Api/EnumLocalizedNameTest.php index 180a2e472..4fe3988f1 100644 --- a/tests/Unit/Rules/Api/EnumLocalizedNameTest.php +++ b/tests/Unit/Rules/Api/EnumLocalizedNameTest.php @@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; use Tests\Unit\Enums\LocalizedEnum; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('passes if enum description', function (): void { $enum = Arr::random(LocalizedEnum::cases()); @@ -21,7 +21,7 @@ test('passes if enum description', function (): void { [$attribute => new EnumLocalizedNameRule(LocalizedEnum::class)] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails if enum value', function (): void { @@ -34,7 +34,7 @@ test('fails if enum value', function (): void { [$attribute => new EnumLocalizedNameRule(LocalizedEnum::class)] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('fails if string', function (): void { @@ -45,5 +45,5 @@ test('fails if string', function (): void { [$attribute => new EnumLocalizedNameRule(LocalizedEnum::class)] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Api/IsValidBooleanTest.php b/tests/Unit/Rules/Api/IsValidBooleanTest.php index e3c9ffeb4..ad9f335f0 100644 --- a/tests/Unit/Rules/Api/IsValidBooleanTest.php +++ b/tests/Unit/Rules/Api/IsValidBooleanTest.php @@ -6,7 +6,7 @@ use App\Rules\Api\IsValidBoolean; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('passes if boolean', function (): void { $attribute = fake()->word(); @@ -16,7 +16,7 @@ test('passes if boolean', function (): void { [$attribute => new IsValidBoolean()] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('passes if boolean string', function (): void { @@ -29,7 +29,7 @@ test('passes if boolean string', function (): void { [$attribute => new IsValidBoolean()] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('passes if boolean integer', function (): void { @@ -42,7 +42,7 @@ test('passes if boolean integer', function (): void { [$attribute => new IsValidBoolean()] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('passes if boolean checkbox', function (): void { @@ -55,7 +55,7 @@ test('passes if boolean checkbox', function (): void { [$attribute => new IsValidBoolean()] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails if string', function (): void { @@ -66,7 +66,7 @@ test('fails if string', function (): void { [$attribute => new IsValidBoolean()] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('fails if number', function (): void { @@ -77,5 +77,5 @@ test('fails if number', function (): void { [$attribute => new IsValidBoolean()] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Api/RandomSoleTest.php b/tests/Unit/Rules/Api/RandomSoleTest.php index 7990488f5..8342da4de 100644 --- a/tests/Unit/Rules/Api/RandomSoleTest.php +++ b/tests/Unit/Rules/Api/RandomSoleTest.php @@ -7,7 +7,7 @@ use App\Rules\Api\RandomSoleRule; use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails if random is not sole sort', function (): void { $sorts = fake()->words(fake()->randomDigitNotNull()); @@ -21,7 +21,7 @@ test('fails if random is not sole sort', function (): void { [$attribute => new RandomSoleRule()] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('passes if random is not included', function (): void { @@ -34,7 +34,7 @@ test('passes if random is not included', function (): void { [$attribute => new RandomSoleRule()] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('passes if random is sole sort', function (): void { @@ -45,5 +45,5 @@ test('passes if random is sole sort', function (): void { [$attribute => new RandomSoleRule()] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); diff --git a/tests/Unit/Rules/ModerationTest.php b/tests/Unit/Rules/ModerationTest.php index 598c609ba..45aa700b5 100644 --- a/tests/Unit/Rules/ModerationTest.php +++ b/tests/Unit/Rules/ModerationTest.php @@ -10,13 +10,10 @@ use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails if unknown moderation service', function (): void { - $this->expectException(RuntimeException::class); - - Config::set(ValidationConstants::MODERATION_SERVICE_QUALIFIED, fake()->word()); - + expect(fn () => Config::set(ValidationConstants::MODERATION_SERVICE_QUALIFIED, fake()->word()))->toThrow(RuntimeException::class); $attribute = fake()->word(); $validator = Validator::make( @@ -47,7 +44,7 @@ test('fails if flagged by open ai', function (): void { [$attribute => new ModerationRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('passes if not flagged by open ai', function (): void { @@ -70,7 +67,7 @@ test('passes if not flagged by open ai', function (): void { [$attribute => new ModerationRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('passes if open ai fails', function (): void { @@ -87,5 +84,5 @@ test('passes if open ai fails', function (): void { [$attribute => new ModerationRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); diff --git a/tests/Unit/Rules/Storage/StorageDirectoryExistsTest.php b/tests/Unit/Rules/Storage/StorageDirectoryExistsTest.php index 3d2c42b75..419448104 100644 --- a/tests/Unit/Rules/Storage/StorageDirectoryExistsTest.php +++ b/tests/Unit/Rules/Storage/StorageDirectoryExistsTest.php @@ -7,7 +7,7 @@ use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('passes if directory exists', function (): void { $directory = fake()->word(); @@ -23,7 +23,7 @@ test('passes if directory exists', function (): void { [$attribute => new StorageDirectoryExistsRule($fs)] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails if directory does not exist', function (): void { @@ -36,5 +36,5 @@ test('fails if directory does not exist', function (): void { [$attribute => new StorageDirectoryExistsRule($fs)] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Storage/StorageFileDirectoryExistsTest.php b/tests/Unit/Rules/Storage/StorageFileDirectoryExistsTest.php index 5a82e9c15..1d4397927 100644 --- a/tests/Unit/Rules/Storage/StorageFileDirectoryExistsTest.php +++ b/tests/Unit/Rules/Storage/StorageFileDirectoryExistsTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\Testing\File; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('passes if directory exists', function (): void { /** @var FilesystemAdapter $fs */ @@ -26,7 +26,7 @@ test('passes if directory exists', function (): void { [$attribute => new StorageFileDirectoryExistsRule($fs)] ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails if directory does not exist', function (): void { @@ -39,5 +39,5 @@ test('fails if directory does not exist', function (): void { [$attribute => new StorageFileDirectoryExistsRule($fs)] ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Wiki/Resource/AnimeResourceLinkFormatTest.php b/tests/Unit/Rules/Wiki/Resource/AnimeResourceLinkFormatTest.php index cb8995c2d..89db9abe5 100644 --- a/tests/Unit/Rules/Wiki/Resource/AnimeResourceLinkFormatTest.php +++ b/tests/Unit/Rules/Wiki/Resource/AnimeResourceLinkFormatTest.php @@ -10,7 +10,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails for no pattern', function (): void { $attribute = fake()->word(); @@ -20,7 +20,7 @@ test('fails for no pattern', function (): void { [$attribute => new AnimeResourceLinkFormatRule(ResourceSite::YOUTUBE_MUSIC)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('passes for pattern', function (): void { @@ -36,7 +36,7 @@ test('passes for pattern', function (): void { [$attribute => new AnimeResourceLinkFormatRule($site)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails for trailing slash', function (): void { @@ -56,7 +56,7 @@ test('fails for trailing slash', function (): void { [$attribute => new AnimeResourceLinkFormatRule($site)], ); - $this->assertFalse($site->getPattern(Anime::class) && $validator->passes()); + expect($site->getPattern(Anime::class) && $validator->passes())->toBeFalse(); }); test('fails for trailing slug', function (): void { @@ -77,7 +77,7 @@ test('fails for trailing slug', function (): void { [$attribute => new AnimeResourceLinkFormatRule($site)], ); - $this->assertFalse($site->getPattern(Anime::class) && $validator->passes()); + expect($site->getPattern(Anime::class) && $validator->passes())->toBeFalse(); }); test('fails for other resources', function (): void { @@ -98,5 +98,5 @@ test('fails for other resources', function (): void { [$attribute => new AnimeResourceLinkFormatRule($site)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Wiki/Resource/AnimeThemeEntryResourceLinkFormatTest.php b/tests/Unit/Rules/Wiki/Resource/AnimeThemeEntryResourceLinkFormatTest.php index 48038c384..c8b333ad3 100644 --- a/tests/Unit/Rules/Wiki/Resource/AnimeThemeEntryResourceLinkFormatTest.php +++ b/tests/Unit/Rules/Wiki/Resource/AnimeThemeEntryResourceLinkFormatTest.php @@ -10,7 +10,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails for no pattern', function (): void { $attribute = fake()->word(); @@ -20,7 +20,7 @@ test('fails for no pattern', function (): void { [$attribute => new EntryResourceLinkFormatRule(ResourceSite::YOUTUBE_MUSIC)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('passes for pattern', function (): void { @@ -36,7 +36,7 @@ test('passes for pattern', function (): void { [$attribute => new EntryResourceLinkFormatRule($site)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails for trailing slash', function (): void { @@ -56,7 +56,7 @@ test('fails for trailing slash', function (): void { [$attribute => new EntryResourceLinkFormatRule($site)], ); - $this->assertFalse($site->getPattern(Entry::class) && $validator->passes()); + expect($site->getPattern(Entry::class) && $validator->passes())->toBeFalse(); }); test('fails for trailing slug', function (): void { @@ -77,7 +77,7 @@ test('fails for trailing slug', function (): void { [$attribute => new EntryResourceLinkFormatRule($site)], ); - $this->assertFalse($site->getPattern(Entry::class) && $validator->passes()); + expect($site->getPattern(Entry::class) && $validator->passes())->toBeFalse(); }); test('fails for other resources', function (): void { @@ -98,5 +98,5 @@ test('fails for other resources', function (): void { [$attribute => new EntryResourceLinkFormatRule($site)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Wiki/Resource/ArtistResourceLinkFormatTest.php b/tests/Unit/Rules/Wiki/Resource/ArtistResourceLinkFormatTest.php index 0024eb7d7..433c1104e 100644 --- a/tests/Unit/Rules/Wiki/Resource/ArtistResourceLinkFormatTest.php +++ b/tests/Unit/Rules/Wiki/Resource/ArtistResourceLinkFormatTest.php @@ -10,7 +10,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails for no pattern', function (): void { $attribute = fake()->word(); @@ -20,7 +20,7 @@ test('fails for no pattern', function (): void { [$attribute => new ArtistResourceLinkFormatRule(ResourceSite::DISNEY_PLUS)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('passes for pattern', function (): void { @@ -36,7 +36,7 @@ test('passes for pattern', function (): void { [$attribute => new ArtistResourceLinkFormatRule($site)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails for trailing slash', function (): void { @@ -56,7 +56,7 @@ test('fails for trailing slash', function (): void { [$attribute => new ArtistResourceLinkFormatRule($site)], ); - $this->assertFalse($site->getPattern(Artist::class) && $validator->passes()); + expect($site->getPattern(Artist::class) && $validator->passes())->toBeFalse(); }); test('fails for trailing slug', function (): void { @@ -77,7 +77,7 @@ test('fails for trailing slug', function (): void { [$attribute => new ArtistResourceLinkFormatRule($site)], ); - $this->assertFalse($site->getPattern(Artist::class) && $validator->passes()); + expect($site->getPattern(Artist::class) && $validator->passes())->toBeFalse(); }); test('fails for other resources', function (): void { @@ -98,5 +98,5 @@ test('fails for other resources', function (): void { [$attribute => new ArtistResourceLinkFormatRule($site)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Wiki/Resource/ResourceLinkFormatTest.php b/tests/Unit/Rules/Wiki/Resource/ResourceLinkFormatTest.php index e392e27d7..b48e8f677 100644 --- a/tests/Unit/Rules/Wiki/Resource/ResourceLinkFormatTest.php +++ b/tests/Unit/Rules/Wiki/Resource/ResourceLinkFormatTest.php @@ -13,7 +13,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('passes for no site', function (): void { $attribute = fake()->word(); @@ -23,7 +23,7 @@ test('passes for no site', function (): void { [$attribute => new ResourceLinkFormatRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('passes for no pattern', function (): void { @@ -34,7 +34,7 @@ test('passes for no pattern', function (): void { [$attribute => new ResourceLinkFormatRule(ResourceSite::OFFICIAL_SITE)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('passes for anime resource', function (): void { @@ -59,7 +59,7 @@ test('passes for anime resource', function (): void { [$attribute => new ResourceLinkFormatRule($site)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('passes for artist resource', function (): void { @@ -84,7 +84,7 @@ test('passes for artist resource', function (): void { [$attribute => new ResourceLinkFormatRule($site)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('passes for song resource', function (): void { @@ -106,7 +106,7 @@ test('passes for song resource', function (): void { [$attribute => new ResourceLinkFormatRule($site)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('passes for studio resource', function (): void { @@ -129,7 +129,7 @@ test('passes for studio resource', function (): void { [$attribute => new ResourceLinkFormatRule($site)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails for trailing slash', function (): void { @@ -151,5 +151,5 @@ test('fails for trailing slash', function (): void { [$attribute => new ResourceLinkFormatRule($site)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Wiki/Resource/ResourceSiteMatchesLinkTest.php b/tests/Unit/Rules/Wiki/Resource/ResourceSiteMatchesLinkTest.php index 8c3186856..56bfe5625 100644 --- a/tests/Unit/Rules/Wiki/Resource/ResourceSiteMatchesLinkTest.php +++ b/tests/Unit/Rules/Wiki/Resource/ResourceSiteMatchesLinkTest.php @@ -8,7 +8,7 @@ use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('passes if site matches link', function (): void { $site = null; @@ -33,7 +33,7 @@ test('passes if site matches link', function (): void { [$attribute => new ResourceSiteMatchesLinkRule($url)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('resource site domain rule official passes', function (): void { @@ -44,7 +44,7 @@ test('resource site domain rule official passes', function (): void { [$attribute => new ResourceSiteMatchesLinkRule(fake()->url())], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('resource site domain rule fails', function (): void { @@ -64,5 +64,5 @@ test('resource site domain rule fails', function (): void { [$attribute => new ResourceSiteMatchesLinkRule(fake()->url())], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Wiki/Resource/SongResourceLinkFormatTest.php b/tests/Unit/Rules/Wiki/Resource/SongResourceLinkFormatTest.php index f400a679e..3c30aa7e9 100644 --- a/tests/Unit/Rules/Wiki/Resource/SongResourceLinkFormatTest.php +++ b/tests/Unit/Rules/Wiki/Resource/SongResourceLinkFormatTest.php @@ -10,7 +10,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails for no pattern', function (): void { $attribute = fake()->word(); @@ -20,7 +20,7 @@ test('fails for no pattern', function (): void { [$attribute => new SongResourceLinkFormatRule(ResourceSite::HULU)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('passes for pattern', function (): void { @@ -36,7 +36,7 @@ test('passes for pattern', function (): void { [$attribute => new SongResourceLinkFormatRule($site)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails for trailing slash', function (): void { @@ -56,7 +56,7 @@ test('fails for trailing slash', function (): void { [$attribute => new SongResourceLinkFormatRule($site)], ); - $this->assertFalse($site->getPattern(Song::class) && $validator->passes()); + expect($site->getPattern(Song::class) && $validator->passes())->toBeFalse(); }); test('fails for trailing slug', function (): void { @@ -77,7 +77,7 @@ test('fails for trailing slug', function (): void { [$attribute => new SongResourceLinkFormatRule($site)], ); - $this->assertFalse($site->getPattern(Song::class) && $validator->passes()); + expect($site->getPattern(Song::class) && $validator->passes())->toBeFalse(); }); test('fails for other resources', function (): void { @@ -98,5 +98,5 @@ test('fails for other resources', function (): void { [$attribute => new SongResourceLinkFormatRule($site)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Wiki/Resource/StudioResourceLinkFormatTest.php b/tests/Unit/Rules/Wiki/Resource/StudioResourceLinkFormatTest.php index 9e6d2fce3..0f15ad7c5 100644 --- a/tests/Unit/Rules/Wiki/Resource/StudioResourceLinkFormatTest.php +++ b/tests/Unit/Rules/Wiki/Resource/StudioResourceLinkFormatTest.php @@ -10,7 +10,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails for no pattern', function (): void { $attribute = fake()->word(); @@ -20,7 +20,7 @@ test('fails for no pattern', function (): void { [$attribute => new StudioResourceLinkFormatRule(ResourceSite::SPOTIFY)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); test('passes for pattern', function (): void { @@ -36,7 +36,7 @@ test('passes for pattern', function (): void { [$attribute => new StudioResourceLinkFormatRule($site)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); }); test('fails for trailing slash', function (): void { @@ -56,7 +56,7 @@ test('fails for trailing slash', function (): void { [$attribute => new StudioResourceLinkFormatRule($site)], ); - $this->assertFalse($site->getPattern(Studio::class) && $validator->passes()); + expect($site->getPattern(Studio::class) && $validator->passes())->toBeFalse(); }); test('fails for trailing slug', function (): void { @@ -77,7 +77,7 @@ test('fails for trailing slug', function (): void { [$attribute => new StudioResourceLinkFormatRule($site)], ); - $this->assertFalse($site->getPattern(Studio::class) && $validator->passes()); + expect($site->getPattern(Studio::class) && $validator->passes())->toBeFalse(); }); test('fails for other resources', function (): void { @@ -98,5 +98,5 @@ test('fails for other resources', function (): void { [$attribute => new StudioResourceLinkFormatRule($site)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Audio/AudioChannelLayoutStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Audio/AudioChannelLayoutStreamTest.php index 10e42406c..4bef43544 100644 --- a/tests/Unit/Rules/Wiki/Submission/Audio/AudioChannelLayoutStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Audio/AudioChannelLayoutStreamTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when layout is not stereo', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -42,7 +42,7 @@ test('fails when layout is not stereo', function (): void { ['file' => new AudioChannelLayoutStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -78,7 +78,7 @@ test('passes when layout is stereo', function (): void { ['file' => new AudioChannelLayoutStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Audio/AudioChannelsStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Audio/AudioChannelsStreamTest.php index e984a69fc..f7a0031d6 100644 --- a/tests/Unit/Rules/Wiki/Submission/Audio/AudioChannelsStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Audio/AudioChannelsStreamTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when channel count is not two', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -42,7 +42,7 @@ test('fails when channel count is not two', function (): void { ['file' => new AudioChannelsStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -78,7 +78,7 @@ test('passes when channel count is two', function (): void { ['file' => new AudioChannelsStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Audio/AudioCodecStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Audio/AudioCodecStreamTest.php index af3fa53eb..de156c899 100644 --- a/tests/Unit/Rules/Wiki/Submission/Audio/AudioCodecStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Audio/AudioCodecStreamTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when codec is not opus', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -42,7 +42,7 @@ test('fails when codec is not opus', function (): void { ['file' => new AudioCodecStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -78,7 +78,7 @@ test('passes when codec is opus', function (): void { ['file' => new AudioCodecStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Audio/AudioIndexStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Audio/AudioIndexStreamTest.php index c5c24563d..402e4942e 100644 --- a/tests/Unit/Rules/Wiki/Submission/Audio/AudioIndexStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Audio/AudioIndexStreamTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when index is not expected', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -42,7 +42,7 @@ test('fails when index is not expected', function (): void { ['file' => new AudioIndexStreamRule(fake()->unique()->randomDigitNotNull())], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -80,7 +80,7 @@ test('passes when index is expected', function (): void { ['file' => new AudioIndexStreamRule($index)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Audio/AudioLoudnessIntegratedTargetStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Audio/AudioLoudnessIntegratedTargetStreamTest.php index fdd648c8d..c224f74e9 100644 --- a/tests/Unit/Rules/Wiki/Submission/Audio/AudioLoudnessIntegratedTargetStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Audio/AudioLoudnessIntegratedTargetStreamTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when integrated target is not expected', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -41,7 +41,7 @@ test('fails when integrated target is not expected', function (): void { ['file' => new AudioLoudnessIntegratedTargetStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatLoudnessCommand($file)); }); @@ -76,7 +76,7 @@ test('passes when integrated target is not expected', function (): void { ['file' => new AudioLoudnessIntegratedTargetStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatLoudnessCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Audio/AudioLoudnessTruePeakStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Audio/AudioLoudnessTruePeakStreamTest.php index 32ff9a00d..0b1eea840 100644 --- a/tests/Unit/Rules/Wiki/Submission/Audio/AudioLoudnessTruePeakStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Audio/AudioLoudnessTruePeakStreamTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when true peak is not expected', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -41,7 +41,7 @@ test('fails when true peak is not expected', function (): void { ['file' => new AudioLoudnessTruePeakStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatLoudnessCommand($file)); }); @@ -76,7 +76,7 @@ test('passes when true peak is expected', function (): void { ['file' => new AudioLoudnessTruePeakStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatLoudnessCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Audio/AudioSampleRateStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Audio/AudioSampleRateStreamTest.php index 24ffa506f..559a9625d 100644 --- a/tests/Unit/Rules/Wiki/Submission/Audio/AudioSampleRateStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Audio/AudioSampleRateStreamTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when sample rate is not expected', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -42,7 +42,7 @@ test('fails when sample rate is not expected', function (): void { ['file' => new AudioSampleRateStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -78,7 +78,7 @@ test('passes when sample rate is expected', function (): void { ['file' => new AudioSampleRateStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Format/AudioBitrateRestrictionFormatTest.php b/tests/Unit/Rules/Wiki/Submission/Format/AudioBitrateRestrictionFormatTest.php index 4815c585f..1b0872424 100644 --- a/tests/Unit/Rules/Wiki/Submission/Format/AudioBitrateRestrictionFormatTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Format/AudioBitrateRestrictionFormatTest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; use Laravel\Pennant\Feature; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when bitrate is not expected', function (): void { Feature::activate(FeatureConstants::AUDIO_BITRATE_RESTRICTION); @@ -43,7 +43,7 @@ test('fails when bitrate is not expected', function (): void { ['file' => new AudioBitrateRestrictionFormatRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -78,7 +78,7 @@ test('passes when bitrate is expected', function (): void { ['file' => new AudioBitrateRestrictionFormatRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Format/EncoderNameFormatTest.php b/tests/Unit/Rules/Wiki/Submission/Format/EncoderNameFormatTest.php index b541ab834..285d6ca04 100644 --- a/tests/Unit/Rules/Wiki/Submission/Format/EncoderNameFormatTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Format/EncoderNameFormatTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when encoder name is not ffmpeg', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -41,7 +41,7 @@ test('fails when encoder name is not ffmpeg', function (): void { ['file' => new EncoderNameFormatRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -76,7 +76,7 @@ test('passes when encoder name is ffmpeg', function (): void { ['file' => new EncoderNameFormatRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Format/EncoderVersionFormatTest.php b/tests/Unit/Rules/Wiki/Submission/Format/EncoderVersionFormatTest.php index 60be65cc2..223417e96 100644 --- a/tests/Unit/Rules/Wiki/Submission/Format/EncoderVersionFormatTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Format/EncoderVersionFormatTest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; use Laravel\Pennant\Feature; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when encoder version is older than required', function (): void { Feature::activate(FeatureConstants::REQUIRED_ENCODER_VERSION, 'Lavf59.27.100'); @@ -45,7 +45,7 @@ test('fails when encoder version is older than required', function (): void { ['file' => new EncoderVersionFormatRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -82,7 +82,7 @@ test('fails when encoder version is up to date', function (): void { ['file' => new EncoderVersionFormatRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Format/ExtraneousChaptersFormatTest.php b/tests/Unit/Rules/Wiki/Submission/Format/ExtraneousChaptersFormatTest.php index 4ea9009d8..1a1dc2e6e 100644 --- a/tests/Unit/Rules/Wiki/Submission/Format/ExtraneousChaptersFormatTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Format/ExtraneousChaptersFormatTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when chapter data is not empty', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -39,7 +39,7 @@ test('fails when chapter data is not empty', function (): void { ['file' => new ExtraneousChaptersFormatRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -70,7 +70,7 @@ test('passes when chapter data is empty', function (): void { ['file' => new ExtraneousChaptersFormatRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Format/ExtraneousMetadataFormatTest.php b/tests/Unit/Rules/Wiki/Submission/Format/ExtraneousMetadataFormatTest.php index c4d9a8b41..f202a7716 100644 --- a/tests/Unit/Rules/Wiki/Submission/Format/ExtraneousMetadataFormatTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Format/ExtraneousMetadataFormatTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when extraneous metadata is present', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -43,7 +43,7 @@ test('fails when extraneous metadata is present', function (): void { ['file' => new ExtraneousMetadataFormatRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -79,7 +79,7 @@ test('passes no extraneous metadata', function (): void { ['file' => new ExtraneousMetadataFormatRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Format/FormatNameFormatTest.php b/tests/Unit/Rules/Wiki/Submission/Format/FormatNameFormatTest.php index fe1027cbf..02909d3e4 100644 --- a/tests/Unit/Rules/Wiki/Submission/Format/FormatNameFormatTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Format/FormatNameFormatTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when format name is not expected', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -39,7 +39,7 @@ test('fails when format name is not expected', function (): void { ['file' => new FormatNameFormatRule(fake()->unique()->word())], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -74,7 +74,7 @@ test('passes when format name is expected', function (): void { ['file' => new FormatNameFormatRule($formatName)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Format/TotalStreamsFormatTest.php b/tests/Unit/Rules/Wiki/Submission/Format/TotalStreamsFormatTest.php index fd1acde44..2e5f1ca2f 100644 --- a/tests/Unit/Rules/Wiki/Submission/Format/TotalStreamsFormatTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Format/TotalStreamsFormatTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when count is not expected', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -41,7 +41,7 @@ test('fails when count is not expected', function (): void { ['file' => new TotalStreamsFormatRule(2)], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -79,7 +79,7 @@ test('passes when count is expected', function (): void { ['file' => new TotalStreamsFormatRule(2)], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Format/VideoBitrateRestrictionFormatTest.php b/tests/Unit/Rules/Wiki/Submission/Format/VideoBitrateRestrictionFormatTest.php index 849ea13a4..4bd47b4e5 100644 --- a/tests/Unit/Rules/Wiki/Submission/Format/VideoBitrateRestrictionFormatTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Format/VideoBitrateRestrictionFormatTest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; use Laravel\Pennant\Feature; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when bitrate is not expected', function (): void { Feature::activate(FeatureConstants::VIDEO_BITRATE_RESTRICTION); @@ -52,7 +52,7 @@ test('fails when bitrate is not expected', function (): void { ['file' => new VideoBitrateRestrictionFormatRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -96,7 +96,7 @@ test('passes when bitrate is expected', function (): void { ['file' => new VideoBitrateRestrictionFormatRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/SubmissionTest.php b/tests/Unit/Rules/Wiki/Submission/SubmissionTest.php index 2265f230d..8160bd0d0 100644 --- a/tests/Unit/Rules/Wiki/Submission/SubmissionTest.php +++ b/tests/Unit/Rules/Wiki/Submission/SubmissionTest.php @@ -31,7 +31,7 @@ use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; use Laravel\Pennant\Feature; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('runs processes once', function (): void { Feature::activate(FeatureConstants::REQUIRED_ENCODER_VERSION, 'Lavf59.27.100'); @@ -122,7 +122,7 @@ test('runs processes once', function (): void { ], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRanTimes(UploadedFileAction::formatFfprobeCommand($file)); Process::assertRanTimes(UploadedFileAction::formatLoudnessCommand($file)); diff --git a/tests/Unit/Rules/Wiki/Submission/Video/VideoCodecStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Video/VideoCodecStreamTest.php index 367cc70f4..23a35a817 100644 --- a/tests/Unit/Rules/Wiki/Submission/Video/VideoCodecStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Video/VideoCodecStreamTest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; use Laravel\Pennant\Feature; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when codec is not vp9', function (): void { Feature::activate(FeatureConstants::VIDEO_CODEC_STREAM, 'vp9'); @@ -46,7 +46,7 @@ test('fails when codec is not vp9', function (): void { ['file' => new VideoCodecStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -84,7 +84,7 @@ test('passes when codec is vp9', function (): void { ['file' => new VideoCodecStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Video/VideoColorPrimariesStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Video/VideoColorPrimariesStreamTest.php index afbe3c38a..f165b9b95 100644 --- a/tests/Unit/Rules/Wiki/Submission/Video/VideoColorPrimariesStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Video/VideoColorPrimariesStreamTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; use Laravel\Pennant\Feature; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when color primaries is not accepted', function (): void { Feature::activate(FeatureConstants::VIDEO_COLOR_PRIMARIES_STREAM, 'bt709,smpte170m,bt470bg'); @@ -47,7 +47,7 @@ test('fails when color primaries is not accepted', function (): void { ['file' => new VideoColorPrimariesStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -85,7 +85,7 @@ test('passes when color primaries is accepted', function (): void { ['file' => new VideoColorPrimariesStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Video/VideoColorSpaceStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Video/VideoColorSpaceStreamTest.php index 71ed41942..2f4b7025a 100644 --- a/tests/Unit/Rules/Wiki/Submission/Video/VideoColorSpaceStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Video/VideoColorSpaceStreamTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; use Laravel\Pennant\Feature; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when color space is not accepted', function (): void { Feature::activate(FeatureConstants::VIDEO_COLOR_SPACE_STREAM, 'bt709,smpte170m,bt470bg'); @@ -47,7 +47,7 @@ test('fails when color space is not accepted', function (): void { ['file' => new VideoColorSpaceStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -85,7 +85,7 @@ test('passes when color space is accepted', function (): void { ['file' => new VideoColorSpaceStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Video/VideoColorTransferStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Video/VideoColorTransferStreamTest.php index cec7f117f..7a7fcaf37 100644 --- a/tests/Unit/Rules/Wiki/Submission/Video/VideoColorTransferStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Video/VideoColorTransferStreamTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; use Laravel\Pennant\Feature; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when color transfer is not accepted', function (): void { Feature::activate(FeatureConstants::VIDEO_COLOR_TRANSFER_STREAM, 'bt709,smpte170m,bt470bg'); @@ -47,7 +47,7 @@ test('fails when color transfer is not accepted', function (): void { ['file' => new VideoColorTransferStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -85,7 +85,7 @@ test('passes when color transfer is accepted', function (): void { ['file' => new VideoColorTransferStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Video/VideoIndexStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Video/VideoIndexStreamTest.php index 38284db72..2cf1f1746 100644 --- a/tests/Unit/Rules/Wiki/Submission/Video/VideoIndexStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Video/VideoIndexStreamTest.php @@ -9,7 +9,7 @@ use Illuminate\Http\UploadedFile; use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when index is not expected', function (): void { $file = UploadedFile::fake()->create(fake()->word().'.webm', fake()->randomDigitNotNull()); @@ -42,7 +42,7 @@ test('fails when index is not expected', function (): void { ['file' => new VideoIndexStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -78,7 +78,7 @@ test('passes when index is expected', function (): void { ['file' => new VideoIndexStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Rules/Wiki/Submission/Video/VideoPixelFormatStreamTest.php b/tests/Unit/Rules/Wiki/Submission/Video/VideoPixelFormatStreamTest.php index 36b92290d..3a22be631 100644 --- a/tests/Unit/Rules/Wiki/Submission/Video/VideoPixelFormatStreamTest.php +++ b/tests/Unit/Rules/Wiki/Submission/Video/VideoPixelFormatStreamTest.php @@ -11,7 +11,7 @@ use Illuminate\Support\Facades\Process; use Illuminate\Support\Facades\Validator; use Laravel\Pennant\Feature; -uses(WithFaker::class); +pest()->use(WithFaker::class); test('fails when codec is not yuv420p', function (): void { Feature::activate(FeatureConstants::VIDEO_PIXEL_FORMAT_STREAM, 'yuv420p'); @@ -46,7 +46,7 @@ test('fails when codec is not yuv420p', function (): void { ['file' => new VideoPixelFormatStreamRule()], ); - $this->assertFalse($validator->passes()); + expect($validator->passes())->toBeFalse(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); @@ -84,7 +84,7 @@ test('passes when codec is yuv420p', function (): void { ['file' => new VideoPixelFormatStreamRule()], ); - $this->assertTrue($validator->passes()); + expect($validator->passes())->toBeTrue(); Process::assertRan(UploadedFileAction::formatFfprobeCommand($file)); }); diff --git a/tests/Unit/Scout/Elasticsearch/Api/Parser/FilterParserTest.php b/tests/Unit/Scout/Elasticsearch/Api/Parser/FilterParserTest.php deleted file mode 100644 index affbd7c05..000000000 --- a/tests/Unit/Scout/Elasticsearch/Api/Parser/FilterParserTest.php +++ /dev/null @@ -1,84 +0,0 @@ -word()); - - $comparisonOperator = Arr::random(ComparisonOperator::cases()); - - $predicate = new Predicate(fake()->word(), $comparisonOperator, $expression); - - $logicalOperator = Arr::random(BinaryLogicalOperator::cases()); - - $criteria = new BaseWhereCriteria($predicate, $logicalOperator, new GlobalScope()); - - $this->assertInstanceOf(WhereCriteria::class, FilterParser::parse($criteria)); -}); - -test('where in criteria', function (): void { - $expression = new Expression(fake()->word()); - - $comparisonOperator = Arr::random(ComparisonOperator::cases()); - - $predicate = new Predicate(fake()->word(), $comparisonOperator, $expression); - - $criteria = new BaseWhereInCriteria( - $predicate, - Arr::random(BinaryLogicalOperator::cases()), - fake()->boolean(), - new GlobalScope() - ); - - $this->assertInstanceOf(WhereInCriteria::class, FilterParser::parse($criteria)); -}); - -test('has criteria', function (): void { - $expression = new Expression(fake()->word()); - - $comparisonOperator = Arr::random(ComparisonOperator::cases()); - - $predicate = new Predicate(fake()->word(), $comparisonOperator, $expression); - - $criteria = new HasCriteria( - $predicate, - Arr::random(BinaryLogicalOperator::cases()), - new GlobalScope(), - fake()->randomDigitNotNull() - ); - - $this->assertNull(FilterParser::parse($criteria)); -}); - -test('trashed criteria', function (): void { - $expression = new Expression(fake()->word()); - - $comparisonOperator = Arr::random(ComparisonOperator::cases()); - - $predicate = new Predicate(fake()->word(), $comparisonOperator, $expression); - - $criteria = new TrashedCriteria( - $predicate, - Arr::random(BinaryLogicalOperator::cases()), - new GlobalScope() - ); - - $this->assertNull(FilterParser::parse($criteria)); -}); diff --git a/tests/Unit/Scout/Elasticsearch/Api/Parser/PagingParserTest.php b/tests/Unit/Scout/Elasticsearch/Api/Parser/PagingParserTest.php deleted file mode 100644 index 5a7a8c3bd..000000000 --- a/tests/Unit/Scout/Elasticsearch/Api/Parser/PagingParserTest.php +++ /dev/null @@ -1,24 +0,0 @@ -randomDigitNotNull()); - - $this->assertInstanceOf(LimitCriteria::class, PagingParser::parse($criteria)); -}); - -test('offset criteria', function (): void { - $criteria = new BaseOffsetCriteria(fake()->randomDigitNotNull()); - - $this->assertInstanceOf(OffsetCriteria::class, PagingParser::parse($criteria)); -}); diff --git a/tests/Unit/Scout/Elasticsearch/Api/Parser/SortParserTest.php b/tests/Unit/Scout/Elasticsearch/Api/Parser/SortParserTest.php deleted file mode 100644 index 82aee8bdc..000000000 --- a/tests/Unit/Scout/Elasticsearch/Api/Parser/SortParserTest.php +++ /dev/null @@ -1,38 +0,0 @@ -word(), $direction); - - $this->assertInstanceOf(RelationCriteria::class, SortParser::parse($criteria)); -}); - -test('field criteria', function (): void { - $direction = Arr::random(Direction::cases()); - - $criteria = new BaseFieldCriteria(new GlobalScope(), fake()->word(), $direction); - - $this->assertInstanceOf(FieldCriteria::class, SortParser::parse($criteria)); -}); - -test('random criteria', function (): void { - $criteria = new RandomCriteria(new GlobalScope()); - - $this->assertNull(SortParser::parse($criteria)); -});