Fix tests

This commit is contained in:
Guilhem N 2016-11-18 22:16:53 +01:00
parent b0ba1dd9c6
commit c6bbaecc54
No known key found for this signature in database
GPG Key ID: 9E5D2DB67BF054DD
4 changed files with 7 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -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)

View File

@ -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(),

View File

@ -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",