@@ -1071,14 +1071,14 @@ public function testBelongsToCreatesProperRelation()
1071
1071
$ model = new EloquentModelStub ;
1072
1072
$ this ->addMockConnection ($ model );
1073
1073
$ relation = $ model ->belongsToStub ();
1074
- $ this ->assertEquals ('belongs_to_stub_id ' , $ relation ->getForeignKey ());
1074
+ $ this ->assertEquals ('belongs_to_stub_id ' , $ relation ->getForeignKeyName ());
1075
1075
$ this ->assertSame ($ model , $ relation ->getParent ());
1076
1076
$ this ->assertInstanceOf (EloquentModelSaveStub::class, $ relation ->getQuery ()->getModel ());
1077
1077
1078
1078
$ model = new EloquentModelStub ;
1079
1079
$ this ->addMockConnection ($ model );
1080
1080
$ relation = $ model ->belongsToExplicitKeyStub ();
1081
- $ this ->assertEquals ('foo ' , $ relation ->getForeignKey ());
1081
+ $ this ->assertEquals ('foo ' , $ relation ->getForeignKeyName ());
1082
1082
}
1083
1083
1084
1084
public function testMorphToCreatesProperRelation ()
@@ -1088,27 +1088,27 @@ public function testMorphToCreatesProperRelation()
1088
1088
1089
1089
// $this->morphTo();
1090
1090
$ relation = $ model ->morphToStub ();
1091
- $ this ->assertEquals ('morph_to_stub_id ' , $ relation ->getForeignKey ());
1091
+ $ this ->assertEquals ('morph_to_stub_id ' , $ relation ->getForeignKeyName ());
1092
1092
$ this ->assertEquals ('morph_to_stub_type ' , $ relation ->getMorphType ());
1093
1093
$ this ->assertEquals ('morphToStub ' , $ relation ->getRelation ());
1094
1094
$ this ->assertSame ($ model , $ relation ->getParent ());
1095
1095
$ this ->assertInstanceOf (EloquentModelSaveStub::class, $ relation ->getQuery ()->getModel ());
1096
1096
1097
1097
// $this->morphTo(null, 'type', 'id');
1098
1098
$ relation2 = $ model ->morphToStubWithKeys ();
1099
- $ this ->assertEquals ('id ' , $ relation2 ->getForeignKey ());
1099
+ $ this ->assertEquals ('id ' , $ relation2 ->getForeignKeyName ());
1100
1100
$ this ->assertEquals ('type ' , $ relation2 ->getMorphType ());
1101
1101
$ this ->assertEquals ('morphToStubWithKeys ' , $ relation2 ->getRelation ());
1102
1102
1103
1103
// $this->morphTo('someName');
1104
1104
$ relation3 = $ model ->morphToStubWithName ();
1105
- $ this ->assertEquals ('some_name_id ' , $ relation3 ->getForeignKey ());
1105
+ $ this ->assertEquals ('some_name_id ' , $ relation3 ->getForeignKeyName ());
1106
1106
$ this ->assertEquals ('some_name_type ' , $ relation3 ->getMorphType ());
1107
1107
$ this ->assertEquals ('someName ' , $ relation3 ->getRelation ());
1108
1108
1109
1109
// $this->morphTo('someName', 'type', 'id');
1110
1110
$ relation4 = $ model ->morphToStubWithNameAndKeys ();
1111
- $ this ->assertEquals ('id ' , $ relation4 ->getForeignKey ());
1111
+ $ this ->assertEquals ('id ' , $ relation4 ->getForeignKeyName ());
1112
1112
$ this ->assertEquals ('type ' , $ relation4 ->getMorphType ());
1113
1113
$ this ->assertEquals ('someName ' , $ relation4 ->getRelation ());
1114
1114
}
0 commit comments