[Serializer] Use autoloader for annotations in tests
This commit is contained in:
parent
fcd6d6085f
commit
75e2ebfa30
@ -22,8 +22,6 @@ use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
|
||||
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
|
||||
use Symfony\Component\Serializer\Tests\Fixtures\GroupDummy;
|
||||
|
||||
require_once __DIR__.'/../../Annotation/Groups.php';
|
||||
|
||||
class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
|
@ -21,8 +21,6 @@ use Symfony\Component\Serializer\Tests\Fixtures\GroupDummy;
|
||||
use Symfony\Component\Serializer\Tests\Fixtures\PropertyCircularReferenceDummy;
|
||||
use Symfony\Component\Serializer\Tests\Fixtures\PropertySiblingHolder;
|
||||
|
||||
require_once __DIR__.'/../../Annotation/Groups.php';
|
||||
|
||||
class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
|
14
src/Symfony/Component/Serializer/Tests/bootstrap.php
Normal file
14
src/Symfony/Component/Serializer/Tests/bootstrap.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
$loader = require __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function ($class) { return class_exists($class); });
|
@ -4,7 +4,7 @@
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
bootstrap="Tests/bootstrap.php"
|
||||
>
|
||||
<php>
|
||||
<!-- Disable E_USER_DEPRECATED until 3.0 -->
|
||||
|
Reference in New Issue
Block a user