NelmioApiDocBundle/Tests/Controller/ControllersTest.php
Guilhem N 393a6c061e
Add areas support (#1169)
* Add areas support

* Document the Areas feature

* Allow to expose swagger area as JSON

* Fixes

* last fixes
2018-01-05 13:08:02 +01:00

42 lines
1.5 KiB
PHP

<?php
/*
* This file is part of the NelmioApiDocBundle package.
*
* (c) Nelmio
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Nelmio\ApiDocBundle\Tests\Controller;
use Nelmio\ApiDocBundle\ApiDocGenerator;
use Nelmio\ApiDocBundle\Controller\DocumentationController;
use Nelmio\ApiDocBundle\Controller\SwaggerUiController;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
class ControllersTest extends TestCase
{
/**
* @group legacy
* @expectedDeprecation Providing an instance of "Nelmio\ApiDocBundle\ApiDocGenerator" to "Nelmio\ApiDocBundle\Controller\SwaggerUiController::__construct()" is deprecated since version 3.1. Provide it an instance of "Psr\Container\ContainerInterface" instead.
*/
public function testSwaggerUiControllerInstanciation()
{
$controller = new SwaggerUiController(new ApiDocGenerator([], []), $this->createMock('Twig_Environment'));
$controller(new Request());
}
/**
* @group legacy
* @expectedDeprecation Providing an instance of "Nelmio\ApiDocBundle\ApiDocGenerator" to "Nelmio\ApiDocBundle\Controller\DocumentationController::__construct()" is deprecated since version 3.1. Provide it an instance of "Psr\Container\ContainerInterface" instead.
*/
public function testDocumentationControllerInstanciation()
{
$controller = new DocumentationController(new ApiDocGenerator([], []));
$controller(new Request());
}
}