示例#1
0
 public function testCorrectMorphClassIsReturned()
 {
     Relation::morphMap(['alias' => 'AnotherModel']);
     $model = new EloquentModelStub();
     try {
         $this->assertEquals('EloquentModelStub', $model->getMorphClass());
     } finally {
         Relation::morphMap([], false);
     }
 }