mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Fix tests
This commit is contained in:
parent
b0ba1dd9c6
commit
c6bbaecc54
@ -12,14 +12,14 @@
|
||||
namespace EXSyst\Bundle\ApiDocBundle\Describer;
|
||||
|
||||
use ApiPlatform\Core\Documentation\Documentation;
|
||||
use ApiPlatform\Core\Swagger\DocumentationNormalizer;
|
||||
use ApiPlatform\Core\Swagger\Serializer\DocumentationNormalizer;
|
||||
|
||||
class ApiPlatformDescriber extends ExternalDocDescriber
|
||||
{
|
||||
public function __construct(Documentation $documentation, DocumentationNormalizer $normalizer, bool $overwrite = false)
|
||||
{
|
||||
parent::__construct(function () use ($documentation, $normalizer) {
|
||||
return $normalizer->normalize($documentation);
|
||||
return (array) $normalizer->normalize($documentation);
|
||||
}, $overwrite);
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class FunctionalTest extends WebTestCase
|
||||
{
|
||||
static::createClient();
|
||||
|
||||
return static::$kernel->getContainer()->get('exsyst_api_doc.generator')->extract();
|
||||
return static::$kernel->getContainer()->get('exsyst_api_doc.generator')->generate();
|
||||
}
|
||||
|
||||
private function getOperation($path, $method)
|
||||
|
@ -15,6 +15,7 @@ use EXSyst\Bundle\ApiDocBundle\Tests\Functional\TestBundle;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle;
|
||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||
use Symfony\Bundle\TwigBundle\TwigBundle;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
@ -31,6 +32,7 @@ class TestKernel extends Kernel
|
||||
{
|
||||
return [
|
||||
new FrameworkBundle(),
|
||||
new TwigBundle(),
|
||||
new SensioFrameworkExtraBundle(),
|
||||
new ApiPlatformBundle(),
|
||||
new EXSystApiDocBundle(),
|
||||
|
@ -14,6 +14,8 @@
|
||||
"exsyst/swagger": "~0.2.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/twig-bundle": "^3.2",
|
||||
"symfony/config": "^3.2",
|
||||
"symfony/validator": "^3.2",
|
||||
"symfony/property-access": "^3.2",
|
||||
"symfony/browser-kit": "^3.2",
|
||||
|
Loading…
x
Reference in New Issue
Block a user