@@ -370,21 +370,21 @@ public function testMorph(): void
370370 $ this ->assertEquals ($ photo ->id , $ client ->photo ->id );
371371
372372 $ photo = Photo::first ();
373- $ this ->assertEquals ($ photo ->imageable ->name , $ user ->name );
373+ $ this ->assertEquals ($ photo ->hasImage ->name , $ user ->name );
374374
375375 $ user = User::with ('photos ' )->find ($ user ->_id );
376376 $ relations = $ user ->getRelations ();
377377 $ this ->assertArrayHasKey ('photos ' , $ relations );
378378 $ this ->assertEquals (1 , $ relations ['photos ' ]->count ());
379379
380- $ photos = Photo::with ('imageable ' )->get ();
380+ $ photos = Photo::with ('hasImage ' )->get ();
381381 $ 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 );
384384
385385 $ 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 );
388388 }
389389
390390 public function testHasManyHas (): void
0 commit comments