mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-10-20 17:49:20 +02:00
tests: fixed tests & entry name (#779)
This commit is contained in:
1 parent
fc7ec8d3d1
commit
d4b39d0c8e
3 files changed
+3
-3
No files matched your search
@@ -152,7 +152,7 @@ class Page extends BaseResource
|
||||
->maxLength(16777215)
|
||||
->rules(['required', 'max:16777215'])
|
||||
->columnSpan(2)
|
||||
->formatStateUsing(fn (PageModel $record) => $record->body),
|
||||
->formatStateUsing(fn (?PageModel $record) => $record?->body),
|
||||
])
|
||||
->columns(2);
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ class AnimeThemeEntry extends BaseModel implements InteractsWithSchema
|
||||
return Str::of($this->anime->name)
|
||||
->append(' ')
|
||||
->append($this->animetheme->type->localize())
|
||||
->append($this->animetheme->type === ThemeType::IN ? '' : strval($this->sequence ?? 1))
|
||||
->append($this->animetheme->type === ThemeType::IN ? '' : strval($this->animetheme->sequence ?? 1))
|
||||
->append(empty($this->version) ? '' : "v$this->version")
|
||||
->append($this->animetheme->group !== null ? '-'.$this->animetheme->group->slug : '')
|
||||
->__toString();
|
||||
|
||||
@@ -33,7 +33,7 @@ class AnimeThemeFactory extends Factory
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
$type = Arr::random(ThemeType::cases());
|
||||
$type = Arr::random([ThemeType::OP, ThemeType::ED]);
|
||||
|
||||
return [
|
||||
AnimeTheme::ATTRIBUTE_SEQUENCE => fake()->randomDigitNotNull(),
|
||||
|
||||
Reference in new issue
Block a user