minor #21663 Updated PHPUnit namespaces (peterrehm)

This PR was squashed before being merged into the 2.8 branch (closes #21663).

Discussion
----------

Updated PHPUnit namespaces

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Follow Up of #21564

Commits
-------

205ced4 Updated PHPUnit namespaces
This commit is contained in:
Nicolas Grekas 2017-02-20 13:35:45 +01:00
commit f2754ebe53
40 changed files with 80 additions and 40 deletions

View File

@ -14,13 +14,14 @@ namespace Symfony\Bridge\Doctrine\PropertyInfo\Tests;
use Doctrine\DBAL\Types\Type as DBALType;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Tools\Setup;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor;
use Symfony\Component\PropertyInfo\Type;
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class DoctrineExtractorTest extends \PHPUnit_Framework_TestCase
class DoctrineExtractorTest extends TestCase
{
/**
* @var DoctrineExtractor

View File

@ -11,10 +11,11 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ConfigCachePass;
class ConfigCachePassTest extends \PHPUnit_Framework_TestCase
class ConfigCachePassTest extends TestCase
{
public function testThatCheckersAreProcessedInPriorityOrder()
{

View File

@ -11,12 +11,13 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Translation\TranslatorInterface;
class DataCollectorTranslatorPassTest extends \PHPUnit_Framework_TestCase
class DataCollectorTranslatorPassTest extends TestCase
{
private $container;
private $dataCollectorTranslatorPass;

View File

@ -11,6 +11,7 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
@ -20,7 +21,7 @@ use Symfony\Component\Form\AbstractType;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class FormPassTest extends \PHPUnit_Framework_TestCase
class FormPassTest extends TestCase
{
public function testDoNothingIfFormExtensionNotLoaded()
{

View File

@ -11,10 +11,11 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\PropertyInfoPass;
use Symfony\Component\DependencyInjection\Reference;
class PropertyInfoPassTest extends \PHPUnit_Framework_TestCase
class PropertyInfoPassTest extends TestCase
{
public function testServicesAreOrderedAccordingToPriority()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\UnusedTagsPass;
class UnusedTagsPassTest extends \PHPUnit_Framework_TestCase
class UnusedTagsPassTest extends TestCase
{
public function testProcess()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Kernel;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
class MicroKernelTraitTest extends \PHPUnit_Framework_TestCase
class MicroKernelTraitTest extends TestCase
{
/**
* @requires PHP 5.4

View File

@ -2,12 +2,13 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
use Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader;
use Symfony\Component\Config\Loader\LoaderResolver;
class DelegatingLoaderTest extends \PHPUnit_Framework_TestCase
class DelegatingLoaderTest extends TestCase
{
/** @var ControllerNameParser */
private $controllerNameParser;

View File

@ -11,12 +11,13 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Security\Factory;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\GuardAuthenticationFactory;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
class GuardAuthenticationFactoryTest extends \PHPUnit_Framework_TestCase
class GuardAuthenticationFactoryTest extends TestCase
{
/**
* @dataProvider getValidConfigurationTests

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\Config\Tests\Resource;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Resource\FileExistenceResource;
class FileExistenceResourceTest extends \PHPUnit_Framework_TestCase
class FileExistenceResourceTest extends TestCase
{
protected $resource;
protected $file;

View File

@ -11,11 +11,12 @@
namespace Symfony\Component\Config\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Tests\Resource\ResourceStub;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Config\ResourceCheckerConfigCache;
class ResourceCheckerConfigCacheTest extends \PHPUnit_Framework_TestCase
class ResourceCheckerConfigCacheTest extends TestCase
{
private $cacheFile = null;

View File

@ -2,13 +2,14 @@
namespace Symfony\Component\Console\Tests\Helper;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Helper\ProgressIndicator;
use Symfony\Component\Console\Output\StreamOutput;
/**
* @group time-sensitive
*/
class ProgressIndicatorTest extends \PHPUnit_Framework_TestCase
class ProgressIndicatorTest extends TestCase
{
public function testDefaultIndicator()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\CssSelector\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\CssSelector\CssSelectorConverter;
class CssSelectorConverterTest extends \PHPUnit_Framework_TestCase
class CssSelectorConverterTest extends TestCase
{
public function testCssToXPath()
{

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Compiler\AutowirePass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
@ -18,7 +19,7 @@ use Symfony\Component\DependencyInjection\Reference;
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class AutowirePassTest extends \PHPUnit_Framework_TestCase
class AutowirePassTest extends TestCase
{
public function testProcess()
{

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\DependencyInjection\Tests\Loader;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
use Symfony\Component\DependencyInjection\Loader\IniFileLoader;
@ -19,7 +20,7 @@ use Symfony\Component\DependencyInjection\Loader\DirectoryLoader;
use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\Config\FileLocator;
class DirectoryLoaderTest extends \PHPUnit_Framework_TestCase
class DirectoryLoaderTest extends TestCase
{
private static $fixturesPath;

View File

@ -11,10 +11,11 @@
namespace Symfony\Component\Form\Tests\Extension\DependencyInjection;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
use Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension;
class DependencyInjectionExtensionTest extends \PHPUnit_Framework_TestCase
class DependencyInjectionExtensionTest extends TestCase
{
public function testGetTypeExtensions()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\Form\Tests\Util;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Form\Util\StringUtil;
class StringUtilTest extends \PHPUnit_Framework_TestCase
class StringUtilTest extends TestCase
{
public function testTrim()
{

View File

@ -11,13 +11,14 @@
namespace Symfony\Component\Ldap\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Ldap\LdapClient;
use Symfony\Polyfill\Php56\Php56 as p;
/**
* @requires extension ldap
*/
class LdapClientTest extends \PHPUnit_Framework_TestCase
class LdapClientTest extends TestCase
{
public function testLdapEscape()
{

View File

@ -11,13 +11,14 @@
namespace Symfony\Component\PropertyInfo\Tests\PhpDocExtractors;
use PHPUnit\Framework\TestCase;
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
use Symfony\Component\PropertyInfo\Type;
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class PhpDocExtractorTest extends \PHPUnit_Framework_TestCase
class PhpDocExtractorTest extends TestCase
{
/**
* @var PhpDocExtractor

View File

@ -11,13 +11,14 @@
namespace Symfony\Component\PropertyInfo\Tests\Extractor;
use PHPUnit\Framework\TestCase;
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
use Symfony\Component\PropertyInfo\Type;
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class ReflectionExtractorTest extends \PHPUnit_Framework_TestCase
class ReflectionExtractorTest extends TestCase
{
/**
* @var ReflectionExtractor

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\PropertyInfo\PropertyInfo\Tests\Extractors;
use Doctrine\Common\Annotations\AnnotationReader;
use PHPUnit\Framework\TestCase;
use Symfony\Component\PropertyInfo\Extractor\SerializerExtractor;
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
@ -19,7 +20,7 @@ use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class SerializerExtractorTest extends \PHPUnit_Framework_TestCase
class SerializerExtractorTest extends TestCase
{
/**
* @var SerializerExtractor

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\PropertyInfo\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
use Symfony\Component\PropertyInfo\Tests\Fixtures\DummyExtractor;
use Symfony\Component\PropertyInfo\Tests\Fixtures\NullExtractor;
@ -19,7 +20,7 @@ use Symfony\Component\PropertyInfo\Type;
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class PropertyInfoExtractorTest extends \PHPUnit_Framework_TestCase
class PropertyInfoExtractorTest extends TestCase
{
/**
* @var PropertyInfoExtractor

View File

@ -11,12 +11,13 @@
namespace Symfony\Component\PropertyInfo\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\PropertyInfo\Type;
/**
* @author Kévin Dunglas <dunglas@gmail.com>
*/
class TypeTest extends \PHPUnit_Framework_TestCase
class TypeTest extends TestCase
{
public function testConstruct()
{

View File

@ -11,11 +11,12 @@
namespace Symfony\Component\Routing\Tests\Loader;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Routing\Loader\ObjectRouteLoader;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
class ObjectRouteLoaderTest extends \PHPUnit_Framework_TestCase
class ObjectRouteLoaderTest extends TestCase
{
public function testLoadCallsServiceAndReturnsCollection()
{

View File

@ -11,12 +11,13 @@
namespace Symfony\Component\Routing\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\RouteCollectionBuilder;
class RouteCollectionBuilderTest extends \PHPUnit_Framework_TestCase
class RouteCollectionBuilderTest extends TestCase
{
public function testImport()
{

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\Security\Core\Tests\Authentication\Provider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Authentication\Provider\LdapBindAuthenticationProvider;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\User\User;
@ -19,7 +20,7 @@ use Symfony\Component\Ldap\Exception\ConnectionException;
/**
* @requires extension ldap
*/
class LdapBindAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
class LdapBindAuthenticationProviderTest extends TestCase
{
/**
* @expectedException \Symfony\Component\Security\Core\Exception\BadCredentialsException

View File

@ -11,11 +11,12 @@
namespace Symfony\Component\Security\Core\Tests\Authorization\Voter;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
class VoterTest extends \PHPUnit_Framework_TestCase
class VoterTest extends TestCase
{
protected $token;

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\Security\Core\Tests\Exception;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
class CustomUserMessageAuthenticationExceptionTest extends \PHPUnit_Framework_TestCase
class CustomUserMessageAuthenticationExceptionTest extends TestCase
{
public function testConstructWithSAfeMessage()
{

View File

@ -11,13 +11,14 @@
namespace Symfony\Component\Security\Core\Tests\User;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Core\User\LdapUserProvider;
use Symfony\Component\Ldap\Exception\ConnectionException;
/**
* @requires extension ldap
*/
class LdapUserProviderTest extends \PHPUnit_Framework_TestCase
class LdapUserProviderTest extends TestCase
{
/**
* @expectedException \Symfony\Component\Security\Core\Exception\UsernameNotFoundException

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\Security\Guard\Tests\Authenticator;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Core\User\UserInterface;
@ -20,7 +21,7 @@ use Symfony\Component\Security\Guard\Authenticator\AbstractFormLoginAuthenticato
/**
* @author Jean Pasdeloup <jpasdeloup@sedona.fr>
*/
class FormLoginAuthenticatorTest extends \PHPUnit_Framework_TestCase
class FormLoginAuthenticatorTest extends TestCase
{
private $requestWithoutSession;
private $requestWithSession;

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\Security\Guard\Tests\Firewall;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Guard\Firewall\GuardAuthenticationListener;
@ -20,7 +21,7 @@ use Symfony\Component\Security\Core\Exception\AuthenticationException;
/**
* @author Ryan Weaver <weaverryan@gmail.com>
*/
class GuardAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
class GuardAuthenticationListenerTest extends TestCase
{
private $authenticationManager;
private $guardAuthenticatorHandler;

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\Security\Guard\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Guard\GuardAuthenticatorHandler;
@ -18,7 +19,7 @@ use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
use Symfony\Component\Security\Http\SecurityEvents;
class GuardAuthenticatorHandlerTest extends \PHPUnit_Framework_TestCase
class GuardAuthenticatorHandlerTest extends TestCase
{
private $tokenStorage;
private $dispatcher;

View File

@ -11,13 +11,14 @@
namespace Symfony\Component\Security\Guard\Tests\Provider;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Security\Guard\Provider\GuardAuthenticationProvider;
use Symfony\Component\Security\Guard\Token\PostAuthenticationGuardToken;
/**
* @author Ryan Weaver <weaverryan@gmail.com>
*/
class GuardAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
class GuardAuthenticationProviderTest extends TestCase
{
private $userProvider;
private $userChecker;

View File

@ -2,12 +2,13 @@
namespace Symfony\Component\Security\Http\Tests\Firewall;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Http\EntryPoint\DigestAuthenticationEntryPoint;
use Symfony\Component\Security\Http\Firewall\DigestAuthenticationListener;
class DigestAuthenticationListenerTest extends \PHPUnit_Framework_TestCase
class DigestAuthenticationListenerTest extends TestCase
{
public function testHandleWithValidDigest()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\Serializer\Tests\Encoder;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Serializer\Encoder\ChainDecoder;
class ChainDecoderTest extends \PHPUnit_Framework_TestCase
class ChainDecoderTest extends TestCase
{
const FORMAT_1 = 'format1';
const FORMAT_2 = 'format2';

View File

@ -11,10 +11,11 @@
namespace Symfony\Component\Serializer\Tests\Encoder;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Serializer\Encoder\ChainEncoder;
use Symfony\Component\Serializer\Encoder\NormalizationAwareInterface;
class ChainEncoderTest extends \PHPUnit_Framework_TestCase
class ChainEncoderTest extends TestCase
{
const FORMAT_1 = 'format1';
const FORMAT_2 = 'format2';

View File

@ -11,10 +11,11 @@
namespace Symfony\Component\Serializer\Tests\Encoder;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Serializer\Encoder\JsonDecode;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
class JsonDecodeTest extends \PHPUnit_Framework_TestCase
class JsonDecodeTest extends TestCase
{
/** @var \Symfony\Component\Serializer\Encoder\JsonDecode */
private $decode;

View File

@ -11,10 +11,11 @@
namespace Symfony\Component\Serializer\Tests\Encoder;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Serializer\Encoder\JsonEncode;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
class JsonEncodeTest extends \PHPUnit_Framework_TestCase
class JsonEncodeTest extends TestCase
{
private $encoder;

View File

@ -11,10 +11,11 @@
namespace Symfony\Component\Serializer\Tests\Normalizer;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer;
use Symfony\Component\Serializer\SerializerInterface;
class ArrayDenormalizerTest extends \PHPUnit_Framework_TestCase
class ArrayDenormalizerTest extends TestCase
{
/**
* @var ArrayDenormalizer

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\Translation\Tests\Util;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Translation\Util\ArrayConverter;
class ArrayConverterTest extends \PHPUnit_Framework_TestCase
class ArrayConverterTest extends TestCase
{
/**
* @dataProvider messagesData