10000 Update to PHPUnit namespaces by peterrehm · Pull Request #21564 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Update to PHPUnit namespaces #21564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
Migrated all Bundles to the namespaces TestCase
  • Loading branch information
peterrehm committed Feb 17, 2017
commit 0d0e886790eacca12a56993baffce166db71c105
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

namespace Symfony\Bundle\DebugBundle\Tests\DependencyInjection\Compiler;

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\DebugBundle\DependencyInjection\Compiler\DumpDataCollectorPass;
use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\HttpFoundation\RequestStack;

class DumpDataCollectorPassTest extends \PHPUnit_Framework_TestCase
class DumpDataCollectorPassTest extends TestCase
{
public function testProcessWithFileLinkFormatParameter()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

namespace Symfony\Bundle\DebugBundle\Tests\DependencyInjection;

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\DebugBundle\DependencyInjection\DebugExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;

class DebugExtensionTest extends \PHPUnit_Framework_TestCase
class DebugExtensionTest extends TestCase
{
public function testLoadWithoutConfiguration()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Command;

use PhpUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;

class RouterDebugCommandTest extends \PHPUnit_Framework_TestCase< F438 /td>
class RouterDebugCommandTest extends TestCase
{
public function testDebugAllRoutes()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Command;

use PhpUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand;
Expand All @@ -19,7 +20,7 @@
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\RequestContext;

class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
class RouterMatchCommandTest extends TestCase
{
public function testWithMatchPath()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Command;

use PhpUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
use Symfony\Component\Filesystem\Filesystem;

class TranslationDebugCommandTest extends \PHPUnit_Framework_TestCase
class TranslationDebugCommandTest extends TestCase
{
private $fs;
private $translationDir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Command;

use PhpUnit\Framework\TestCase;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\DependencyInjection;
use Symfony\Component\HttpKernel;

class TranslationUpdateCommandTest extends \PHPUnit_Framework_TestCase
class TranslationUpdateCommandTest extends TestCase
{
private $fs;
private $translationDir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand All @@ -20,7 +21,7 @@
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;

abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase
abstract class AbstractDescriptorTest extends TestCase
{
/** @dataProvider getDescribeRouteCollectionTestData */
public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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\AddCacheWarmerPass;

class AddCacheWarmerPassTest extends \PHPUnit_Framework_TestCase
class AddCacheWarmerPassTest extends TestCase
{
public function testThatCacheWarmersAreProcessedInPriorityOrder()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\HttpKernel\Bundle\Bundle;

class AddConsoleCommandPassTest extends \PHPUnit_Framework_TestCase
class AddConsoleCommandPassTest extends TestCase
{
public function testProcess()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
* file that was distributed with this source code.
*/

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConstraintValidatorsPass;

class AddConstraintValidatorsPassTest extends \PHPUnit_Framework_TestCase
class AddConstraintValidatorsPassTest extends TestCase
{
public function testThatConstraintValidatorServicesAreProcessed()
{
Expand Down
B41A
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddExpressionLanguageProvidersPass;

class AddExpressionLanguageProvidersPassTest extends \PHPUnit_Framework_TestCase
class AddExpressionLanguageProvidersPassTest extends TestCase
{
public function testProcessForRouter()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FragmentRendererPass;

/**
* @group legacy
*/
class LegacyFragmentRendererPassTest extends \PHPUnit_Framework_TestCase
class LegacyFragmentRendererPassTest extends TestCase
{
/**
* Tests that content rendering not implementing FragmentRendererInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TemplatingAssetHelperPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
Expand All @@ -19,7 +20,7 @@
/**
* @group legacy
*/
class LegacyTemplatingAssetHelperPassTest extends \PHPUnit_Framework_TestCase
class LegacyTemplatingAssetHelperPassTest extends TestCase
{
public function getScopesTests()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass;

class LoggingTranslatorPassTest extends \PHPUnit_Framework_TestCase
class LoggingTranslatorPassTest extends TestCase
{
public function testProcess()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass;

class ProfilerPassTest extends \PHPUnit_Framework_TestCase
class ProfilerPassTest extends TestCase
{
private $profilerDefinition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass;

Expand All @@ -19,7 +20,7 @@
*
* @author Javier Lopez <f12loalf@gmail.com>
*/
class SerializerPassTest extends \PHPUnit_Framework_TestCase
class SerializerPassTest extends TestCase
{
public function testThrowExceptionWhenNoNormalizers()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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\TranslatorPass;

class TranslatorPassTest extends \PHPUnit_Framework_TestCase
class TranslatorPassTest extends TestCase
{
public function testValidCollector()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Configuration;
use Symfony\Component\Config\Definition\Processor;

class ConfigurationTest extends \PHPUnit_Framework_TestCase
class ConfigurationTest extends TestCase
{
public function testDefaultConfig()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;

use PhpUnit\Framework\TestCase;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher;
use Symfony\Component\Routing\RequestContext;

class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase
class RedirectableUrlMatcherTest extends TestCase
{
public function testRedirectWhenNoSlash()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;

class RouterTest extends \PHPUnit_Framework_TestCase
class RouterTest extends TestCase
{
public function testGenerateWithServiceParam()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Templating;

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Templating\DelegatingEngine;
use Symfony\Component\HttpFoundation\Response;

class DelegatingEngineTest extends \PHPUnit_Framework_TestCase
class DelegatingEngineTest extends TestCase
{
public function testSupportsRetrievesEngineFromTheContainer()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper;
use Symfony\Component\Asset\Package;
use Symfony\Component\Asset\Packages;
use Symfony\Component\Asset\PathPackage;
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;

class AssetsHelperTest extends \PHPUnit_Framework_TestCase
class AssetsHelperTest extends TestCase
{
/**
* @group legacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Bundle\FrameworkBundle\Templating\Helper\RequestHelper;

class RequestHelperTest extends \PHPUnit_Framework_TestCase
class RequestHelperTest extends TestCase
{
protected $requestStack;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
use Symfony\Bundle\FrameworkBundle\Templating\Helper\SessionHelper;

class SessionHelperTest extends \PHPUnit_Framework_TestCase
class SessionHelperTest extends TestCase
{
protected $requestStack;

Expand Down
57AE
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@

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

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Templating\Helper\StopwatchHelper;

class StopwatchHelperTest extends \PHPUnit_Framework_TestCase
class StopwatchHelperTest extends TestCase
{
public function testDevEnvironment()
{
Expand Down
4 changes: 3 additions & 1 deletion src/Symfony/Bundle/FrameworkBundle/Tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

namespace Symfony\Bundle\FrameworkBundle\Tests;

class TestCase extends \PHPUnit_Framework_TestCase
use PhpUnit\Framework\TestCase as PHPUnitTestCase;

class TestCase extends PHPUnitTestCase
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Translation;

use PhpUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Translation\Translator;
use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Translation\MessageSelector;

class TranslatorTest extends \PHPUnit_Framework_TestCase
class TranslatorTest extends TestCase
{
protected $tmpDir;

Expand Down
Loading
0