createOne(); $this->assertIsString($performance->getName()); }); test('has subtitle', function (): void { $performance = Performance::factory()->createOne(); $this->assertIsString($performance->getSubtitle()); }); test('song', function (): void { $performance = Performance::factory() ->for(Song::factory()) ->createOne(); $this->assertInstanceOf(BelongsTo::class, $performance->song()); $this->assertInstanceOf(Song::class, $performance->song()->first()); }); test('artist', function (): void { $performance = Performance::factory() ->for(Artist::factory()->createOne(), Performance::RELATION_ARTIST) ->createOne(); $this->assertInstanceOf(BelongsTo::class, $performance->artist()); $this->assertInstanceOf(Artist::class, $performance->artist()->first()); }); test('member', function (): void { $performance = Performance::factory() ->for(Artist::factory(), Performance::RELATION_ARTIST) ->for(Artist::factory(), Performance::RELATION_MEMBER) ->createOne(); $this->assertInstanceOf(BelongsTo::class, $performance->member()); $this->assertInstanceOf(Artist::class, $performance->member()->first()); });