@@ -370,21 +370,21 @@ public function testMorph(): void
370
370
$ this ->assertEquals ($ photo ->id , $ client ->photo ->id );
371
371
372
372
$ photo = Photo::first ();
373
- $ this ->assertEquals ($ photo ->imageable ->name , $ user ->name );
373
+ $ this ->assertEquals ($ photo ->hasImage ->name , $ user ->name );
374
374
375
375
$ user = User::with ('photos ' )->find ($ user ->_id );
376
376
$ relations = $ user ->getRelations ();
377
377
$ this ->assertArrayHasKey ('photos ' , $ relations );
378
378
$ this ->assertEquals (1 , $ relations ['photos ' ]->count ());
379
379
380
- $ photos = Photo::with ('imageable ' )->get ();
380
+ $ photos = Photo::with ('hasImage ' )->get ();
381
381
$ relations = $ photos [0 ]->getRelations ();
382
- $ this ->assertArrayHasKey ('imageable ' , $ relations );
383
- $ this ->assertInstanceOf (User::class, $ photos [0 ]->imageable );
382
+ $ this ->assertArrayHasKey ('hasImage ' , $ relations );
383
+ $ this ->assertInstanceOf (User::class, $ photos [0 ]->hasImage );
384
384
385
385
$ relations = $ photos [1 ]->getRelations ();
386
- $ this ->assertArrayHasKey ('imageable ' , $ relations );
387
- $ this ->assertInstanceOf (Client::class, $ photos [1 ]->imageable );
386
+ $ this ->assertArrayHasKey ('hasImage ' , $ relations );
387
+ $ this ->assertInstanceOf (Client::class, $ photos [1 ]->hasImage );
388
388
}
389
389
390
390
public function testHasManyHas (): void
0 commit comments