File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1313 ],
1414 "require" : {
1515 "php" : " >=7.0.0" ,
16- "illuminate/database" : " ~5.5.0|~5.6.0|~5.7.0|~5.8.0" ,
17- "illuminate/events" : " ~5.5.0|~5.6.0|~5.7.0|~5.8.0"
16+ "illuminate/database" : " ~5.5.0|~5.6.0|~5.7.0|~5.8.0|~5.9.0" ,
17+ "illuminate/events" : " ~5.5.0|~5.6.0|~5.7.0|~5.8.0|~5.9.0" ,
18+ "illuminate/support" : " ~5.5.0|~5.6.0|~5.7.0|~5.8.0|~5.9.0"
1819 },
1920 "require-dev" : {
21+ "d11wtq/boris" : " ~1.0.10" ,
22+ "doctrine/dbal" : " *" ,
2023 "mockery/mockery" : " ^1.0" ,
2124 "phpunit/phpunit" : " ^7.0" ,
22- "d11wtq/boris" : " ~1.0.10" ,
23- "doctrine/dbal" : " ^2.9"
25+ "squizlabs/php_codesniffer" : " ^3.4"
2426 },
2527 "autoload" : {
2628 "psr-4" : {
Original file line number Diff line number Diff line change @@ -17,9 +17,14 @@ public function testParentRelationIsSelfReferential() {
1717 public function testParentRelationRefersToCorrectField () {
1818 $ category = new Category ;
1919
20- $ this ->assertEquals ($ category ->getParentColumnName (), $ category ->parent ()->getForeignKeyName ());
21-
22- $ this ->assertEquals ($ category ->getQualifiedParentColumnName (), $ category ->parent ()->getQualifiedForeignKeyName ());
20+ if (method_exists ($ category ->parent (), 'getForeignKeyName ' )) {
21+ // For Laravel 5.6+
22+ $ this ->assertEquals ($ category ->getParentColumnName (), $ category ->parent ()->getForeignKeyName ());
23+ $ this ->assertEquals ($ category ->getQualifiedParentColumnName (), $ category ->parent ()->getQualifiedForeignKeyName ());
24+ } else {
25+ $ this ->assertEquals ($ category ->getParentColumnName (), $ category ->parent ()->getForeignKey ());
26+ $ this ->assertEquals ($ category ->getQualifiedParentColumnName (), $ category ->parent ()->getQualifiedForeignKey ());
27+ }
2328 }
2429
2530 public function testParentRelation () {
You can’t perform that action at this time.
0 commit comments