Browse Source

Update from v3

shalvah 2 years ago
parent
commit
048e542cf4

+ 1 - 1
tests/Strategies/BodyParameters/GetFromBodyParamTagTest.php

@@ -178,7 +178,7 @@ class GetFromBodyParamTagTest extends TestCase
         $method = new \ReflectionMethod(TestController::class, 'withFormRequestParameter');
         $route = new Route(['POST'], "/withFormRequestParameter", ['uses' => [TestController::class, 'withFormRequestParameter']]);
 
-        $results = $this->strategy->getParametersFromTags($route, $method);
+        $results = $this->strategy->getParametersFromDocBlockInFormRequestOrMethod($route, $method);
 
         $this->assertArraySubset([
             'user_id' => [

+ 0 - 27
tests/Strategies/UrlParameters/GetFromLaravelAPITest.php

@@ -166,31 +166,4 @@ class GetFromLaravelAPITest extends BaseLaravelTest
         $strategy = new GetFromLaravelAPI(new DocumentationConfig([]));
         return $strategy($endpoint, []);
     }
-
-    protected function endpointForRoute($path, $controller, $method): ExtractedEndpointData
-    {
-        return $this->endpoint(function (ExtractedEndpointData $e) use ($path, $method, $controller) {
-            $e->method = new \ReflectionMethod($controller, $method);
-            $e->route = app(Router::class)->addRoute(['GET'], $path, ['uses' => [$controller, $method]]);
-            $e->uri = UrlParamsNormalizer::normalizeParameterNamesInRouteUri($e->route, $e->method);
-        });
-    }
-
-    protected function endpoint(Closure $configure): ExtractedEndpointData
-    {
-        $endpoint = new class extends ExtractedEndpointData {
-            public function __construct(array $parameters = [])
-            {
-            }
-        };
-        $configure($endpoint);
-        return $endpoint;
-    }
-
-    protected function fetch($endpoint): array
-    {
-        $strategy = new GetFromLaravelAPI(new DocumentationConfig([]));
-        return $strategy($endpoint, []);
-    }
-
 }