forPlaylist() ->createOne(); $this->assertIsString($like->getName()); }); test('has subtitle', function (): void { $like = Like::factory() ->forPlaylist() ->createOne(); $this->assertIsString($like->getSubtitle()); }); test('playlist', function (): void { $like = Like::factory() ->forPlaylist() ->createOne(); $this->assertInstanceOf(MorphTo::class, $like->likeable()); $this->assertInstanceOf(Playlist::class, $like->likeable()->first()); }); test('entry', function (): void { $like = Like::factory() ->forEntry() ->createOne(); $this->assertInstanceOf(MorphTo::class, $like->likeable()); $this->assertInstanceOf(AnimeThemeEntry::class, $like->likeable()->first()); }); test('user', function (): void { $like = Like::factory() ->forPlaylist() ->createOne(); $this->assertInstanceOf(BelongsTo::class, $like->user()); $this->assertInstanceOf(User::class, $like->user()->first()); });