minor #21687 Updated to PHPUnit namespaces (peterrehm)

This PR was merged into the 3.3-dev branch.

Discussion
----------

Updated to PHPUnit namespaces

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

Commits
-------

b84eb86 Updated to PHPUnit namespaces
This commit is contained in:
Nicolas Grekas 2017-02-20 15:00:56 +01:00
commit 61d535332f
24 changed files with 49 additions and 24 deletions

View File

@ -11,6 +11,7 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\AssetExtension; use Symfony\Bridge\Twig\Extension\AssetExtension;
use Symfony\Component\Asset\Packages; use Symfony\Component\Asset\Packages;
use Symfony\Component\Asset\Preload\PreloadManager; use Symfony\Component\Asset\Preload\PreloadManager;
@ -18,7 +19,7 @@ use Symfony\Component\Asset\Preload\PreloadManager;
/** /**
* @author Kévin Dunglas <dunglas@gmail.com> * @author Kévin Dunglas <dunglas@gmail.com>
*/ */
class AssetExtensionTest extends \PHPUnit_Framework_TestCase class AssetExtensionTest extends TestCase
{ {
public function testGetAndPreloadAssetUrl() public function testGetAndPreloadAssetUrl()
{ {

View File

@ -11,6 +11,7 @@
namespace Symfony\Bridge\Twig\Tests\Extension; namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\WorkflowExtension; use Symfony\Bridge\Twig\Extension\WorkflowExtension;
use Symfony\Component\Workflow\Definition; use Symfony\Component\Workflow\Definition;
use Symfony\Component\Workflow\Marking; use Symfony\Component\Workflow\Marking;
@ -19,7 +20,7 @@ use Symfony\Component\Workflow\SupportStrategy\ClassInstanceSupportStrategy;
use Symfony\Component\Workflow\Transition; use Symfony\Component\Workflow\Transition;
use Symfony\Component\Workflow\Workflow; use Symfony\Component\Workflow\Workflow;
class WorkflowExtensionTest extends \PHPUnit_Framework_TestCase class WorkflowExtensionTest extends TestCase
{ {
private $extension; private $extension;

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\Asset\Tests\EventListener; namespace Symfony\Component\Asset\Tests\EventListener;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Asset\EventListener\PreloadListener; use Symfony\Component\Asset\EventListener\PreloadListener;
use Symfony\Component\Asset\Preload\PreloadManager; use Symfony\Component\Asset\Preload\PreloadManager;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@ -21,7 +22,7 @@ use Symfony\Component\HttpKernel\KernelEvents;
/** /**
* @author Kévin Dunglas <dunglas@gmail.com> * @author Kévin Dunglas <dunglas@gmail.com>
*/ */
class PreloadListenerTest extends \PHPUnit_Framework_TestCase class PreloadListenerTest extends TestCase
{ {
public function testOnKernelResponse() public function testOnKernelResponse()
{ {

View File

@ -11,10 +11,12 @@
namespace Symfony\Component\Asset\Preload; namespace Symfony\Component\Asset\Preload;
use PHPUnit\Framework\TestCase;
/** /**
* @author Kévin Dunglas <dunglas@gmail.com> * @author Kévin Dunglas <dunglas@gmail.com>
*/ */
class PreloadManagerTest extends \PHPUnit_Framework_TestCase class PreloadManagerTest extends TestCase
{ {
public function testManageResources() public function testManageResources()
{ {

View File

@ -11,12 +11,13 @@
namespace Symfony\Component\Cache\Tests\Simple; namespace Symfony\Component\Cache\Tests\Simple;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Cache\Simple\NullCache; use Symfony\Component\Cache\Simple\NullCache;
/** /**
* @group time-sensitive * @group time-sensitive
*/ */
class NullCacheTest extends \PHPUnit_Framework_TestCase class NullCacheTest extends TestCase
{ {
public function createCachePool() public function createCachePool()
{ {

View File

@ -12,9 +12,10 @@
namespace Symfony\Component\Config\Tests\Resource; namespace Symfony\Component\Config\Tests\Resource;
use Composer\Autoload\ClassLoader; use Composer\Autoload\ClassLoader;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Resource\ComposerResource; use Symfony\Component\Config\Resource\ComposerResource;
class ComposerResourceTest extends \PHPUnit_Framework_TestCase class ComposerResourceTest extends TestCase
{ {
public function testGetVendor() public function testGetVendor()
{ {

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\Config\Tests\Resource; namespace Symfony\Component\Config\Tests\Resource;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Resource\ReflectionClassResource; use Symfony\Component\Config\Resource\ReflectionClassResource;
class ReflectionClassResourceTest extends \PHPUnit_Framework_TestCase class ReflectionClassResourceTest extends TestCase
{ {
public function testToString() public function testToString()
{ {

View File

@ -11,13 +11,14 @@
namespace Symfony\Component\Console\Tests\DependencyInjection; namespace Symfony\Component\Console\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass; use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Bundle\Bundle;
class AddConsoleCommandPassTest extends \PHPUnit_Framework_TestCase class AddConsoleCommandPassTest extends TestCase
{ {
/** /**
* @dataProvider visibilityProvider * @dataProvider visibilityProvider

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\Console\Tests\EventListener; namespace Symfony\Component\Console\Tests\EventListener;
use PHPUnit\Framework\TestCase;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Event\ConsoleExceptionEvent; use Symfony\Component\Console\Event\ConsoleExceptionEvent;
@ -22,7 +23,7 @@ use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
class ExceptionListenerTest extends \PHPUnit_Framework_TestCase class ExceptionListenerTest extends TestCase
{ {
public function testOnConsoleException() public function testOnConsoleException()
{ {

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\DependencyInjection\Tests\Argument; namespace Symfony\Component\DependencyInjection\Tests\Argument;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
class RewindableGeneratorTest extends \PHPUnit_Framework_TestCase class RewindableGeneratorTest extends TestCase
{ {
public function testImplementsCountable() public function testImplementsCountable()
{ {

View File

@ -11,10 +11,11 @@
namespace Symfony\Component\DependencyInjection\Tests; namespace Symfony\Component\DependencyInjection\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ChildDefinition;
use Symfony\Component\DependencyInjection\DefinitionDecorator; use Symfony\Component\DependencyInjection\DefinitionDecorator;
class ChildDefinitionTest extends \PHPUnit_Framework_TestCase class ChildDefinitionTest extends TestCase
{ {
public function testConstructor() public function testConstructor()
{ {

View File

@ -11,13 +11,14 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler; namespace Symfony\Component\DependencyInjection\Tests\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Compiler\CheckArgumentsValidityPass; use Symfony\Component\DependencyInjection\Compiler\CheckArgumentsValidityPass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
/** /**
* @author Kévin Dunglas <dunglas@gmail.com> * @author Kévin Dunglas <dunglas@gmail.com>
*/ */
class CheckArgumentsValidityPassTest extends \PHPUnit_Framework_TestCase class CheckArgumentsValidityPassTest extends TestCase
{ {
public function testProcess() public function testProcess()
{ {

View File

@ -11,11 +11,12 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler; namespace Symfony\Component\DependencyInjection\Tests\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Compiler\ResolveClassPass; use Symfony\Component\DependencyInjection\Compiler\ResolveClassPass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass; use Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
class ResolveClassPassTest extends \PHPUnit_Framework_TestCase class ResolveClassPassTest extends TestCase
{ {
/** /**
* @dataProvider provideValidClassId * @dataProvider provideValidClassId

View File

@ -11,12 +11,13 @@
namespace Symfony\Component\DependencyInjection\Tests\Compiler; namespace Symfony\Component\DependencyInjection\Tests\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass; use Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;
class ResolveFactoryClassPassTest extends \PHPUnit_Framework_TestCase class ResolveFactoryClassPassTest extends TestCase
{ {
public function testProcess() public function testProcess()
{ {

View File

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

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\DependencyInjection\Tests\Loader; namespace Symfony\Component\DependencyInjection\Tests\Loader;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\FileLocator; use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Loader\LoaderResolver; use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
@ -21,7 +22,7 @@ use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;
class FileLoaderTest extends \PHPUnit_Framework_TestCase class FileLoaderTest extends TestCase
{ {
protected static $fixturesPath; protected static $fixturesPath;

View File

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

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\DependencyInjection\Tests; namespace Symfony\Component\DependencyInjection\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ServiceLocator; use Symfony\Component\DependencyInjection\ServiceLocator;
class ServiceLocatorTest extends \PHPUnit_Framework_TestCase class ServiceLocatorTest extends TestCase
{ {
public function testHas() public function testHas()
{ {

View File

@ -11,10 +11,11 @@
namespace Symfony\Component\Dotenv\Tests; namespace Symfony\Component\Dotenv\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Dotenv\Dotenv; use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\Dotenv\Exception\FormatException; use Symfony\Component\Dotenv\Exception\FormatException;
class DotenvTest extends \PHPUnit_Framework_TestCase class DotenvTest extends TestCase
{ {
/** /**
* @dataProvider getEnvDataWithFormatErrors * @dataProvider getEnvDataWithFormatErrors

View File

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

View File

@ -11,10 +11,11 @@
namespace Symfony\Component\HttpKernel\Tests\CacheClearer; namespace Symfony\Component\HttpKernel\Tests\CacheClearer;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer; use Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer;
use Psr\Cache\CacheItemPoolInterface; use Psr\Cache\CacheItemPoolInterface;
class Psr6CacheClearerTest extends \PHPUnit_Framework_TestCase class Psr6CacheClearerTest extends TestCase
{ {
public function testClearPoolsInjectedInConstructor() public function testClearPoolsInjectedInConstructor()
{ {

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\Security\Tests\Http\Firewall; namespace Symfony\Component\Security\Tests\Http\Firewall;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\Event\GetResponseEvent;
@ -27,7 +28,7 @@ use Symfony\Component\Security\Http\Firewall\UsernamePasswordJsonAuthenticationL
/** /**
* @author Kévin Dunglas <dunglas@gmail.com> * @author Kévin Dunglas <dunglas@gmail.com>
*/ */
class UsernamePasswordJsonAuthenticationListenerTest extends \PHPUnit_Framework_TestCase class UsernamePasswordJsonAuthenticationListenerTest extends TestCase
{ {
/** /**
* @var UsernamePasswordJsonAuthenticationListener * @var UsernamePasswordJsonAuthenticationListener

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\Serializer\Tests\DependencyInjection; namespace Symfony\Component\Serializer\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Serializer\DependencyInjection\SerializerPass; use Symfony\Component\Serializer\DependencyInjection\SerializerPass;
@ -19,7 +20,7 @@ use Symfony\Component\Serializer\DependencyInjection\SerializerPass;
* *
* @author Javier Lopez <f12loalf@gmail.com> * @author Javier Lopez <f12loalf@gmail.com>
*/ */
class SerializerPassTest extends \PHPUnit_Framework_TestCase class SerializerPassTest extends TestCase
{ {
public function testThrowExceptionWhenNoNormalizers() public function testThrowExceptionWhenNoNormalizers()
{ {

View File

@ -2,10 +2,11 @@
namespace Symfony\Component\Workflow\Tests\SupportStrategy; namespace Symfony\Component\Workflow\Tests\SupportStrategy;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Workflow\SupportStrategy\ClassInstanceSupportStrategy; use Symfony\Component\Workflow\SupportStrategy\ClassInstanceSupportStrategy;
use Symfony\Component\Workflow\Workflow; use Symfony\Component\Workflow\Workflow;
class ClassInstanceSupportStrategyTest extends \PHPUnit_Framework_TestCase class ClassInstanceSupportStrategyTest extends TestCase
{ {
public function testSupportsIfClassInstance() public function testSupportsIfClassInstance()
{ {