Use phpunit 6

This commit is contained in:
Guilhem Niot 2017-05-31 19:36:17 +02:00
parent 87a42ab52d
commit a65b7c4074
4 changed files with 7 additions and 4 deletions

View File

@ -12,8 +12,9 @@
namespace Nelmio\ApiDocBundle\Tests\Describer;
use EXSyst\Component\Swagger\Swagger;
use PHPUnit\Framework\TestCase;
abstract class AbstractDescriberTest extends \PHPUnit_Framework_TestCase
abstract class AbstractDescriberTest extends TestCase
{
protected $describer;

View File

@ -13,18 +13,20 @@ namespace Nelmio\ApiDocBundle\Tests\Model;
use EXSyst\Component\Swagger\Schema;
use EXSyst\Component\Swagger\Swagger;
use PHPUnit\Framework\TestCase;
use Nelmio\ApiDocBundle\Model\Model;
use Nelmio\ApiDocBundle\Model\ModelRegistry;
use Symfony\Component\PropertyInfo\Type;
class ModelRegistryTest extends \PHPUnit_Framework_TestCase
class ModelRegistryTest extends TestCase
{
/**
* @dataProvider unsupportedTypesProvider
*/
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->register(new Model($type));

View File

@ -33,7 +33,6 @@
"symfony/cache": "^3.1",
"symfony/phpunit-bridge": "^3.2",
"sensio/framework-extra-bundle": "^3.0",
"phpunit/phpunit": "^5.4",
"doctrine/annotations": "^1.2",
"phpdocumentor/reflection-docblock": "^3.1",

View File

@ -5,4 +5,5 @@ if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
exit(1);
}
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
putenv('SYMFONY_PHPUNIT_VERSION=6.0');
require __DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit';