mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-13 13:09:25 +03:00
Use phpunit 6
This commit is contained in:
parent
87a42ab52d
commit
a65b7c4074
@ -12,8 +12,9 @@
|
|||||||
namespace Nelmio\ApiDocBundle\Tests\Describer;
|
namespace Nelmio\ApiDocBundle\Tests\Describer;
|
||||||
|
|
||||||
use EXSyst\Component\Swagger\Swagger;
|
use EXSyst\Component\Swagger\Swagger;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
abstract class AbstractDescriberTest extends \PHPUnit_Framework_TestCase
|
abstract class AbstractDescriberTest extends TestCase
|
||||||
{
|
{
|
||||||
protected $describer;
|
protected $describer;
|
||||||
|
|
||||||
|
@ -13,18 +13,20 @@ namespace Nelmio\ApiDocBundle\Tests\Model;
|
|||||||
|
|
||||||
use EXSyst\Component\Swagger\Schema;
|
use EXSyst\Component\Swagger\Schema;
|
||||||
use EXSyst\Component\Swagger\Swagger;
|
use EXSyst\Component\Swagger\Swagger;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
use Nelmio\ApiDocBundle\Model\Model;
|
use Nelmio\ApiDocBundle\Model\Model;
|
||||||
use Nelmio\ApiDocBundle\Model\ModelRegistry;
|
use Nelmio\ApiDocBundle\Model\ModelRegistry;
|
||||||
use Symfony\Component\PropertyInfo\Type;
|
use Symfony\Component\PropertyInfo\Type;
|
||||||
|
|
||||||
class ModelRegistryTest extends \PHPUnit_Framework_TestCase
|
class ModelRegistryTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @dataProvider unsupportedTypesProvider
|
* @dataProvider unsupportedTypesProvider
|
||||||
*/
|
*/
|
||||||
public function testUnsupportedTypeException(Type $type, string $stringType)
|
public function testUnsupportedTypeException(Type $type, string $stringType)
|
||||||
{
|
{
|
||||||
$this->setExpectedException('\LogicException', sprintf('Schema of type "%s" can\'t be generated, no describer supports it.', $stringType));
|
$this->expectException('\LogicException');
|
||||||
|
$this->expectExceptionMessage(sprintf('Schema of type "%s" can\'t be generated, no describer supports it.', $stringType));
|
||||||
|
|
||||||
$registry = new ModelRegistry([], new Swagger());
|
$registry = new ModelRegistry([], new Swagger());
|
||||||
$registry->register(new Model($type));
|
$registry->register(new Model($type));
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
"symfony/cache": "^3.1",
|
"symfony/cache": "^3.1",
|
||||||
"symfony/phpunit-bridge": "^3.2",
|
"symfony/phpunit-bridge": "^3.2",
|
||||||
"sensio/framework-extra-bundle": "^3.0",
|
"sensio/framework-extra-bundle": "^3.0",
|
||||||
"phpunit/phpunit": "^5.4",
|
|
||||||
"doctrine/annotations": "^1.2",
|
"doctrine/annotations": "^1.2",
|
||||||
|
|
||||||
"phpdocumentor/reflection-docblock": "^3.1",
|
"phpdocumentor/reflection-docblock": "^3.1",
|
||||||
|
1
phpunit
1
phpunit
@ -5,4 +5,5 @@ if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
|
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
|
||||||
|
putenv('SYMFONY_PHPUNIT_VERSION=6.0');
|
||||||
require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';
|
require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user