Skip to content

Commit accab89

Browse files
peterrehmfabpot
authored andcommitted
Update to PHPUnit namespaces
1 parent 95aea67 commit accab89

27 files changed

+55
-27
lines changed

Test/KernelTestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Test;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Finder\Finder;
1516
use Symfony\Component\HttpKernel\KernelInterface;
1617

@@ -19,7 +20,7 @@
1920
*
2021
* @author Fabien Potencier <[email protected]>
2122
*/
22-
abstract class KernelTestCase extends \PHPUnit_Framework_TestCase
23+
abstract class KernelTestCase extends TestCase
2324
{
2425
protected static $class;
2526

Tests/Command/RouterDebugCommandTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Console\Application;
1516
use Symfony\Component\Console\Tester\CommandTester;
1617
use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand;
1718
use Symfony\Component\Routing\Route;
1819
use Symfony\Component\Routing\RouteCollection;
1920

20-
class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase
21+
class RouterDebugCommandTest extends TestCase
2122
{
2223
public function testDebugAllRoutes()
2324
{

Tests/Command/RouterMatchCommandTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Console\Application;
1516
use Symfony\Component\Console\Tester\CommandTester;
1617
use Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand;
@@ -19,7 +20,7 @@
1920
use Symfony\Component\Routing\RouteCollection;
2021
use Symfony\Component\Routing\RequestContext;
2122

22-
class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
23+
class RouterMatchCommandTest extends TestCase
2324
{
2425
public function testWithMatchPath()
2526
{

Tests/Command/TranslationDebugCommandTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Console\Application;
1516
use Symfony\Component\Console\Tester\CommandTester;
1617
use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
1718
use Symfony\Component\Filesystem\Filesystem;
1819

19-
class TranslationDebugCommandTest extends \PHPUnit_Framework_TestCase
20+
class TranslationDebugCommandTest extends TestCase
2021
{
2122
private $fs;
2223
private $translationDir;

Tests/Command/TranslationUpdateCommandTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Console\Application;
1516
use Symfony\Component\Console\Tester\CommandTester;
1617
use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand;
1718
use Symfony\Component\Filesystem\Filesystem;
1819
use Symfony\Component\DependencyInjection;
1920
use Symfony\Component\HttpKernel;
2021

21-
class TranslationUpdateCommandTest extends \PHPUnit_Framework_TestCase
22+
class TranslationUpdateCommandTest extends TestCase
2223
{
2324
private $fs;
2425
private $translationDir;

Tests/Console/Descriptor/AbstractDescriptorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Console\Output\BufferedOutput;
1516
use Symfony\Component\DependencyInjection\Alias;
1617
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -20,7 +21,7 @@
2021
use Symfony\Component\Routing\Route;
2122
use Symfony\Component\Routing\RouteCollection;
2223

23-
abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase
24+
abstract class AbstractDescriptorTest extends TestCase
2425
{
2526
/** @dataProvider getDescribeRouteCollectionTestData */
2627
public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription)

Tests/DependencyInjection/Compiler/AddCacheWarmerPassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\DependencyInjection\Reference;
1516
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddCacheWarmerPass;
1617

17-
class AddCacheWarmerPassTest extends \PHPUnit_Framework_TestCase
18+
class AddCacheWarmerPassTest extends TestCase
1819
{
1920
public function testThatCacheWarmersAreProcessedInPriorityOrder()
2021
{

Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass;
1516
use Symfony\Component\Console\Command\Command;
1617
use Symfony\Component\DependencyInjection\ContainerBuilder;
1718
use Symfony\Component\DependencyInjection\Definition;
1819
use Symfony\Component\HttpKernel\Bundle\Bundle;
1920

20-
class AddConsoleCommandPassTest extends \PHPUnit_Framework_TestCase
21+
class AddConsoleCommandPassTest extends TestCase
2122
{
2223
public function testProcess()
2324
{

Tests/DependencyInjection/Compiler/AddConstraintValidatorsPassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
use PHPUnit\Framework\TestCase;
1213
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConstraintValidatorsPass;
1314

14-
class AddConstraintValidatorsPassTest extends \PHPUnit_Framework_TestCase
15+
class AddConstraintValidatorsPassTest extends TestCase
1516
{
1617
public function testThatConstraintValidatorServicesAreProcessed()
1718
{

Tests/DependencyInjection/Compiler/AddExpressionLanguageProvidersPassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\DependencyInjection\ContainerBuilder;
1516
use Symfony\Component\DependencyInjection\Definition;
1617
use Symfony\Component\DependencyInjection\Reference;
1718
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass;
1819

19-
class AddExpressionLanguageProvidersPassTest extends \PHPUnit_Framework_TestCase
20+
class AddExpressionLanguageProvidersPassTest extends TestCase
2021
{
2122
public function testProcessForRouter()
2223
{

Tests/DependencyInjection/Compiler/LegacyFragmentRendererPassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\DependencyInjection\Reference;
1516
use Symfony\Component\HttpFoundation\Request;
1617
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FragmentRendererPass;
1718

1819
/**
1920
* @group legacy
2021
*/
21-
class LegacyFragmentRendererPassTest extends \PHPUnit_Framework_TestCase
22+
class LegacyFragmentRendererPassTest extends TestCase
2223
{
2324
/**
2425
* Tests that content rendering not implementing FragmentRendererInterface

Tests/DependencyInjection/Compiler/LegacyTemplatingAssetHelperPassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TemplatingAssetHelperPass;
1516
use Symfony\Component\DependencyInjection\ContainerBuilder;
1617
use Symfony\Component\DependencyInjection\Definition;
@@ -19,7 +20,7 @@
1920
/**
2021
* @group legacy
2122
*/
22-
class LegacyTemplatingAssetHelperPassTest extends \PHPUnit_Framework_TestCase
23+
class LegacyTemplatingAssetHelperPassTest extends TestCase
2324
{
2425
public function getScopesTests()
2526
{

Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass;
1516

16-
class LoggingTranslatorPassTest extends \PHPUnit_Framework_TestCase
17+
class LoggingTranslatorPassTest extends TestCase
1718
{
1819
public function testProcess()
1920
{

Tests/DependencyInjection/Compiler/ProfilerPassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\DependencyInjection\Definition;
1516
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass;
1617

17-
class ProfilerPassTest extends \PHPUnit_Framework_TestCase
18+
class ProfilerPassTest extends TestCase
1819
{
1920
private $profilerDefinition;
2021

Tests/DependencyInjection/Compiler/SerializerPassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\DependencyInjection\Reference;
1516
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass;
1617

@@ -19,7 +20,7 @@
1920
*
2021
* @author Javier Lopez <[email protected]>
2122
*/
22-
class SerializerPassTest extends \PHPUnit_Framework_TestCase
23+
class SerializerPassTest extends TestCase
2324
{
2425
public function testThrowExceptionWhenNoNormalizers()
2526
{

Tests/DependencyInjection/Compiler/TranslatorPassTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\DependencyInjection\Reference;
1516
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslatorPass;
1617

17-
class TranslatorPassTest extends \PHPUnit_Framework_TestCase
18+
class TranslatorPassTest extends TestCase
1819
{
1920
public function testValidCollector()
2021
{

Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Configuration;
1516
use Symfony\Component\Config\Definition\Processor;
1617

17-
class ConfigurationTest extends \PHPUnit_Framework_TestCase
18+
class ConfigurationTest extends TestCase
1819
{
1920
public function testDefaultConfig()
2021
{

Tests/Routing/RedirectableUrlMatcherTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Routing\Route;
1516
use Symfony\Component\Routing\RouteCollection;
1617
use Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher;
1718
use Symfony\Component\Routing\RequestContext;
1819

19-
class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase
20+
class RedirectableUrlMatcherTest extends TestCase
2021
{
2122
public function testRedirectWhenNoSlash()
2223
{

Tests/Routing/RouterTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\FrameworkBundle\Routing\Router;
1516
use Symfony\Component\Routing\Route;
1617
use Symfony\Component\Routing\RouteCollection;
1718

18-
class RouterTest extends \PHPUnit_Framework_TestCase
19+
class RouterTest extends TestCase
1920
{
2021
public function testGenerateWithServiceParam()
2122
{

Tests/Templating/DelegatingEngineTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\FrameworkBundle\Templating\DelegatingEngine;
1516
use Symfony\Component\HttpFoundation\Response;
1617

17-
class DelegatingEngineTest extends \PHPUnit_Framework_TestCase
18+
class DelegatingEngineTest extends TestCase
1819
{
1920
public function testSupportsRetrievesEngineFromTheContainer()
2021
{

Tests/Templating/Helper/AssetsHelperTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper;
1516
use Symfony\Component\Asset\Package;
1617
use Symfony\Component\Asset\Packages;
1718
use Symfony\Component\Asset\PathPackage;
1819
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
1920

20-
class AssetsHelperTest extends \PHPUnit_Framework_TestCase
21+
class AssetsHelperTest extends TestCase
2122
{
2223
/**
2324
* @group legacy

Tests/Templating/Helper/RequestHelperTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\HttpFoundation\Request;
1516
use Symfony\Component\HttpFoundation\RequestStack;
1617
use Symfony\Bundle\FrameworkBundle\Templating\Helper\RequestHelper;
1718

18-
class RequestHelperTest extends \PHPUnit_Framework_TestCase
19+
class RequestHelperTest extends TestCase
1920
{
2021
protected $requestStack;
2122

Tests/Templating/Helper/SessionHelperTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\HttpFoundation\Request;
1516
use Symfony\Component\HttpFoundation\RequestStack;
1617
use Symfony\Component\HttpFoundation\Session\Session;
1718
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
1819
use Symfony\Bundle\FrameworkBundle\Templating\Helper\SessionHelper;
1920

20-
class SessionHelperTest extends \PHPUnit_Framework_TestCase
21+
class SessionHelperTest extends TestCase
2122
{
2223
protected $requestStack;
2324

Tests/Templating/Helper/StopwatchHelperTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Templating\Helper;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\FrameworkBundle\Templating\Helper\StopwatchHelper;
1516

16-
class StopwatchHelperTest extends \PHPUnit_Framework_TestCase
17+
class StopwatchHelperTest extends TestCase
1718
{
1819
public function testDevEnvironment()
1920
{

Tests/TestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests;
1313

14-
class TestCase extends \PHPUnit_Framework_TestCase
14+
use PHPUnit\Framework\TestCase as PHPUnitTestCase;
15+
16+
class TestCase extends PHPUnitTestCase
1517
{
1618
}

Tests/Translation/TranslatorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Translation;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\FrameworkBundle\Translation\Translator;
1516
use Symfony\Component\Translation\MessageCatalogue;
1617
use Symfony\Component\Filesystem\Filesystem;
1718
use Symfony\Component\Translation\MessageSelector;
1819

19-
class TranslatorTest extends \PHPUnit_Framework_TestCase
20+
class TranslatorTest extends TestCase
2021
{
2122
protected $tmpDir;
2223

Tests/Validator/ConstraintValidatorFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Validator;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory;
1516
use Symfony\Component\DependencyInjection\Container;
1617
use Symfony\Component\Validator\Constraints\Blank as BlankConstraint;
1718

18-
class ConstraintValidatorFactoryTest extends \PHPUnit_Framework_TestCase
19+
class ConstraintValidatorFactoryTest extends TestCase
1920
{
2021
public function testGetInstanceCreatesValidator()
2122
{

0 commit comments

Comments
 (0)