NelmioApiDocBundle/Tests/Describer/SwaggerPhpDescriberTest.php

35 lines
914 B
PHP
Raw Normal View History

2016-08-01 19:58:57 +02:00
<?php
/*
2016-12-29 12:09:26 +01:00
* This file is part of the NelmioApiDocBundle package.
2016-08-01 19:58:57 +02:00
*
2016-12-29 12:09:26 +01:00
* (c) Nelmio
2016-08-01 19:58:57 +02:00
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2016-12-29 12:09:26 +01:00
namespace Nelmio\ApiDocBundle\Tests\Describer;
2016-08-01 19:58:57 +02:00
2017-01-14 17:36:56 +01:00
use EXSyst\Component\Swagger\Swagger;
2016-12-29 12:09:26 +01:00
use Nelmio\ApiDocBundle\Describer\SwaggerPhpDescriber;
2017-01-14 17:36:56 +01:00
use Nelmio\ApiDocBundle\Model\ModelRegistry;
2016-08-01 19:58:57 +02:00
class SwaggerPhpDescriberTest extends AbstractDescriberTest
{
public function testDescribe()
{
$api = $this->getSwaggerDoc();
$info = $api->getInfo();
$this->assertEquals('My Awesome App', $info->getTitle());
$this->assertEquals('1.3', $info->getVersion());
}
protected function setUp()
{
$this->describer = new SwaggerPhpDescriber(__DIR__.'/../Fixtures');
2017-01-14 17:36:56 +01:00
$this->describer->setModelRegistry(new ModelRegistry([], new Swagger()));
2016-08-01 19:58:57 +02:00
}
}