mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-13 04:59:24 +03:00
Fix CS
This commit is contained in:
parent
b4c74ee938
commit
0fada289f5
@ -31,7 +31,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|||||||
use Symfony\Component\DependencyInjection\Definition;
|
use Symfony\Component\DependencyInjection\Definition;
|
||||||
use Symfony\Component\HttpKernel\Kernel;
|
use Symfony\Component\HttpKernel\Kernel;
|
||||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||||
use Symfony\Component\Routing\RouteCollectionBuilder;
|
|
||||||
use Symfony\Component\Serializer\Annotation\SerializedName;
|
use Symfony\Component\Serializer\Annotation\SerializedName;
|
||||||
|
|
||||||
class TestKernel extends Kernel
|
class TestKernel extends Kernel
|
||||||
@ -112,7 +111,8 @@ class TestKernel extends Kernel
|
|||||||
/**
|
/**
|
||||||
* BC for sf < 5.1.
|
* BC for sf < 5.1.
|
||||||
*/
|
*/
|
||||||
private function import($routes, $resource, $prefix, $type) {
|
private function import($routes, $resource, $prefix, $type)
|
||||||
|
{
|
||||||
if ($routes instanceof RoutingConfigurator) {
|
if ($routes instanceof RoutingConfigurator) {
|
||||||
$routes->withPath($prefix)->import($resource, $type);
|
$routes->withPath($prefix)->import($resource, $type);
|
||||||
} else {
|
} else {
|
||||||
|
@ -14,6 +14,7 @@ namespace Nelmio\ApiDocBundle\Tests\Functional;
|
|||||||
use OpenApi\Annotations as OA;
|
use OpenApi\Annotations as OA;
|
||||||
use OpenApi\Generator;
|
use OpenApi\Generator;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||||
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
use Symfony\Component\HttpKernel\KernelInterface;
|
use Symfony\Component\HttpKernel\KernelInterface;
|
||||||
|
|
||||||
class WebTestCase extends BaseWebTestCase
|
class WebTestCase extends BaseWebTestCase
|
||||||
@ -168,4 +169,16 @@ class WebTestCase extends BaseWebTestCase
|
|||||||
sprintf('Failed asserting that property "%s" does not exist.', $property)
|
sprintf('Failed asserting that property "%s" does not exist.', $property)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BC symfony < 5.3
|
||||||
|
*/
|
||||||
|
protected static function getContainer(): ContainerInterface
|
||||||
|
{
|
||||||
|
if (method_exists(parent::class, 'getContainer')) {
|
||||||
|
return parent::getContainer();
|
||||||
|
}
|
||||||
|
|
||||||
|
return static::$container;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user