소스 검색

Fix tests

shalvah 5 년 전
부모
커밋
ae6b2f8a9a
4개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 1 1
      composer.dingo.json
  2. 2 2
      composer.json
  3. 1 1
      src/Tools/Utils.php
  4. 1 1
      tests/Extracting/Strategies/Responses/UseApiResourceTagsTest.php

+ 1 - 1
composer.dingo.json

@@ -15,7 +15,7 @@
         }
     ],
     "require": {
-        "php": ">=7.2.0",
+        "php": ">=7.2.5",
         "ext-json": "*",
         "dingo/api": "^2.3",
         "fzaninotto/faker": "^1.8",

+ 2 - 2
composer.json

@@ -15,9 +15,9 @@
         }
     ],
     "require": {
-        "php": ">=7.2.0",
+        "php": ">=7.2.5",
         "ext-json": "*",
-        "fzaninotto/faker": "^1.8",
+        "fzaninotto/faker": "^1.9.1",
         "illuminate/console": "^5.8|^6.0|^7.0",
         "illuminate/routing": "^5.8|^6.0|^7.0",
         "illuminate/support": "^5.8|^6.0|^7.0",

+ 1 - 1
src/Tools/Utils.php

@@ -234,7 +234,7 @@ class Utils
 
             default:
                 return "`"
-                    . join('`, `', array_slice($list, 0, -1))
+                    . implode('`, `', array_slice($list, 0, -1))
                     . "`, or `" . end($list) . "`";
         }
     }

+ 1 - 1
tests/Extracting/Strategies/Responses/UseApiResourceTagsTest.php

@@ -101,7 +101,7 @@ class UseApiResourceTagsTest extends TestCase
         $factory->afterMaking(TestUser::class, function (TestUser $user, $faker) {
             if ($user->id === 4) {
                 $child = factory(TestUser::class)->make(['id' => 5, 'parent_id' => 4]);
-                $user->setRelation('children', [$child]);
+                $user->setRelation('children', collect($child));
             }
         });