createOne(); $this->assertIsString($group->getName()); }); test('has subtitle', function (): void { $group = Group::factory()->createOne(); $this->assertIsString($group->getSubtitle()); }); test('themes', function (): void { $themeCount = fake()->randomDigitNotNull(); $group = Group::factory() ->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()); });