createOne(); $this->assertIsString($group->getName()); }); test('has subtitle', function () { $group = Group::factory()->createOne(); $this->assertIsString($group->getSubtitle()); }); test('themes', function () { $themeCount = fake()->randomDigitNotNull(); $group = Group::factory() ->has(AnimeTheme::factory()->for(Anime::factory())->count($themeCount)) ->createOne(); $this->assertInstanceOf(HasMany::class, $group->animethemes()); $this->assertEquals($themeCount, $group->animethemes()->count()); $this->assertInstanceOf(AnimeTheme::class, $group->animethemes()->first()); });