Merge branch '2.7' into 2.8

* 2.7:
  Update to PHPUnit namespaces
  remove translation data collector when not usable
This commit is contained in:
Nicolas Grekas 2017-02-18 18:06:33 +01:00
commit 33bae93a44
666 changed files with 1525 additions and 709 deletions

View File

@ -30,6 +30,9 @@
"symfony/polyfill-php70": "~1.0",
"symfony/polyfill-util": "~1.0"
},
"conflict": {
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
},
"replace": {
"symfony/asset": "self.version",
"symfony/browser-kit": "self.version",

View File

@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
// Cache-Id: https://github.com/symfony/phpunit-bridge/commit/4f2aa873d2872a3b9782b25879fd628a0c418bc9
// Cache-Id: https://github.com/symfony/phpunit-bridge/commit/d3157d942a4590121dfd23f9cadf519ca6ad4ac7
if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\nPlease run `composer update` before running this command.\n";

View File

@ -14,6 +14,7 @@ namespace Symfony\Bridge\Doctrine\Test;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
use Doctrine\ORM\EntityManager;
use PHPUnit\Framework\TestCase;
/**
* Provides utility functions needed in tests.
@ -30,7 +31,7 @@ class DoctrineTestHelper
public static function createTestEntityManager()
{
if (!extension_loaded('pdo_sqlite')) {
\PHPUnit_Framework_TestCase::markTestSkipped('Extension pdo_sqlite is required.');
TestCase::markTestSkipped('Extension pdo_sqlite is required.');
}
$config = new \Doctrine\ORM\Configuration();

View File

@ -11,10 +11,11 @@
namespace Symfony\Bridge\Doctrine\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\ContainerAwareEventManager;
use Symfony\Component\DependencyInjection\Container;
class ContainerAwareEventManagerTest extends \PHPUnit_Framework_TestCase
class ContainerAwareEventManagerTest extends TestCase
{
private $container;
private $evm;

View File

@ -12,11 +12,12 @@
namespace Symfony\Bridge\Doctrine\Tests\DataCollector;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class DoctrineDataCollectorTest extends \PHPUnit_Framework_TestCase
class DoctrineDataCollectorTest extends TestCase
{
public function testCollectConnections()
{

View File

@ -11,10 +11,11 @@
namespace Symfony\Bridge\Doctrine\Tests\DataFixtures;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader;
use Symfony\Bridge\Doctrine\Tests\Fixtures\ContainerAwareFixture;
class ContainerAwareLoaderTest extends \PHPUnit_Framework_TestCase
class ContainerAwareLoaderTest extends TestCase
{
public function testShouldSetContainerOnContainerAwareFixture()
{

View File

@ -11,11 +11,12 @@
namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection\CompilerPass;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterEventListenersAndSubscribersPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
class RegisterEventListenersAndSubscribersPassTest extends \PHPUnit_Framework_TestCase
class RegisterEventListenersAndSubscribersPassTest extends TestCase
{
/**
* @expectedException \InvalidArgumentException

View File

@ -11,6 +11,7 @@
namespace Symfony\Bridge\Doctrine\Tests\DependencyInjection;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
@ -18,7 +19,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
/**
* @author Fabio B. Silva <fabio.bat.silva@gmail.com>
*/
class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
class DoctrineExtensionTest extends TestCase
{
/**
* @var \Symfony\Bridge\Doctrine\DependencyInjection\AbstractDoctrineExtension

View File

@ -14,6 +14,7 @@ namespace Symfony\Bridge\Doctrine\Tests;
@trigger_error('The '.__NAMESPACE__.'\DoctrineOrmTestCase class is deprecated since version 2.4 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper class instead.', E_USER_DEPRECATED);
use Doctrine\ORM\EntityManager;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
/**
@ -22,7 +23,7 @@ use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
* @deprecated since version 2.4, to be removed in 3.0.
* Use {@link DoctrineTestHelper} instead.
*/
abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase
abstract class DoctrineOrmTestCase extends TestCase
{
/**
* @return EntityManager

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Doctrine\Tests\ExpressionLanguage;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\ExpressionLanguage\DoctrineParserCache;
class DoctrineParserCacheTest extends \PHPUnit_Framework_TestCase
class DoctrineParserCacheTest extends TestCase
{
public function testFetch()
{

View File

@ -14,6 +14,7 @@ namespace Symfony\Bridge\Doctrine\Tests\Form\ChoiceList;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\Persistence\ObjectRepository;
use Doctrine\ORM\Mapping\ClassMetadata;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader;
use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityLoaderInterface;
use Symfony\Bridge\Doctrine\Form\ChoiceList\IdReader;
@ -23,7 +24,7 @@ use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class DoctrineChoiceLoaderTest extends \PHPUnit_Framework_TestCase
class DoctrineChoiceLoaderTest extends TestCase
{
/**
* @var ChoiceListFactoryInterface|\PHPUnit_Framework_MockObject_MockObject

View File

@ -16,13 +16,14 @@ use Symfony\Bridge\Doctrine\Tests\Fixtures\GroupableEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdNoToStringEntity;
use Symfony\Bridge\Doctrine\Form\ChoiceList\EntityChoiceList;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
use Symfony\Component\Form\Extension\Core\View\ChoiceView;
use Doctrine\ORM\Tools\SchemaTool;
/**
* @group legacy
*/
class GenericEntityChoiceListTest extends \PHPUnit_Framework_TestCase
class GenericEntityChoiceListTest extends TestCase
{
const SINGLE_INT_ID_CLASS = 'Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity';

View File

@ -11,12 +11,13 @@
namespace Symfony\Bridge\Doctrine\Tests\Form\ChoiceList;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Form\ChoiceList\ORMQueryBuilderLoader;
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\Version;
class ORMQueryBuilderLoaderTest extends \PHPUnit_Framework_TestCase
class ORMQueryBuilderLoaderTest extends TestCase
{
/**
* @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException

View File

@ -12,12 +12,13 @@
namespace Symfony\Bridge\Doctrine\Tests\Form\DataTransformer;
use Doctrine\Common\Collections\ArrayCollection;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer;
/**
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class CollectionToArrayTransformerTest extends \PHPUnit_Framework_TestCase
class CollectionToArrayTransformerTest extends TestCase
{
/**
* @var CollectionToArrayTransformer

View File

@ -12,11 +12,12 @@
namespace Symfony\Bridge\Doctrine\Tests\Form;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Form\DoctrineOrmTypeGuesser;
use Symfony\Component\Form\Guess\Guess;
use Symfony\Component\Form\Guess\ValueGuess;
class DoctrineOrmTypeGuesserTest extends \PHPUnit_Framework_TestCase
class DoctrineOrmTypeGuesserTest extends TestCase
{
/**
* @dataProvider requiredProvider

View File

@ -11,6 +11,7 @@
namespace Symfony\Bridge\Doctrine\Tests\HttpFoundation;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionHandler;
/**
@ -18,7 +19,7 @@ use Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionHandler;
*
* @author Drak <drak@zikula.org>
*/
class DbalSessionHandlerTest extends \PHPUnit_Framework_TestCase
class DbalSessionHandlerTest extends TestCase
{
public function testConstruct()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Doctrine\Tests\Logger;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Logger\DbalLogger;
class DbalLoggerTest extends \PHPUnit_Framework_TestCase
class DbalLoggerTest extends TestCase
{
/**
* @dataProvider getLogFixtures

View File

@ -11,12 +11,13 @@
namespace Symfony\Bridge\Doctrine\Tests\Security\User;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
use Symfony\Bridge\Doctrine\Tests\Fixtures\User;
use Symfony\Bridge\Doctrine\Security\User\EntityUserProvider;
use Doctrine\ORM\Tools\SchemaTool;
class EntityUserProviderTest extends \PHPUnit_Framework_TestCase
class EntityUserProviderTest extends TestCase
{
public function testRefreshUserGetsUserByPrimaryKey()
{

View File

@ -12,6 +12,7 @@
namespace Symfony\Bridge\Monolog\Tests\Handler;
use Monolog\Logger;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Monolog\Handler\ConsoleHandler;
use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\Console\Event\ConsoleCommandEvent;
@ -26,7 +27,7 @@ use Symfony\Component\Console\Command\Command;
*
* @author Tobias Schultze <http://tobion.de>
*/
class ConsoleHandlerTest extends \PHPUnit_Framework_TestCase
class ConsoleHandlerTest extends TestCase
{
public function testConstructor()
{

View File

@ -11,13 +11,14 @@
namespace Symfony\Bridge\Monolog\Tests\Handler\FingersCrossed;
use Monolog\Logger;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Monolog\Handler\FingersCrossed\NotFoundActivationStrategy;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Monolog\Logger;
class NotFoundActivationStrategyTest extends \PHPUnit_Framework_TestCase
class NotFoundActivationStrategyTest extends TestCase
{
/**
* @dataProvider isActivatedProvider

View File

@ -3,10 +3,11 @@
namespace Symfony\Bridge\Monolog\Tests;
use Monolog\Handler\TestHandler;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Monolog\Handler\DebugHandler;
use Symfony\Bridge\Monolog\Logger;
class LoggerTest extends \PHPUnit_Framework_TestCase
class LoggerTest extends TestCase
{
/**
* @group legacy

View File

@ -12,10 +12,11 @@
namespace Symfony\Bridge\Monolog\Tests\Processor;
use Monolog\Logger;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Monolog\Processor\WebProcessor;
use Symfony\Component\HttpFoundation\Request;
class WebProcessorTest extends \PHPUnit_Framework_TestCase
class WebProcessorTest extends TestCase
{
public function testUsesRequestServerData()
{

View File

@ -23,6 +23,9 @@
"suggest": {
"symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader"
},
"conflict": {
"phpunit/phpunit": ">=6.0"
},
"autoload": {
"files": [ "bootstrap.php" ],
"psr-4": { "Symfony\\Bridge\\PhpUnit\\": "" },

View File

@ -13,6 +13,7 @@ namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy;
require_once __DIR__.'/Fixtures/includes/foo.php';
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
@ -22,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
*
* @author Marco Pivetta <ocramius@gmail.com>
*/
class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
class ContainerBuilderTest extends TestCase
{
public function testCreateProxyServiceWithRuntimeInstantiator()
{

View File

@ -11,6 +11,7 @@
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\Dumper;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
@ -21,7 +22,7 @@ use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
*
* @author Marco Pivetta <ocramius@gmail.com>
*/
class PhpDumperTest extends \PHPUnit_Framework_TestCase
class PhpDumperTest extends TestCase
{
public function testDumpContainerWithProxyService()
{

View File

@ -11,6 +11,7 @@
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\Instantiator;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
use Symfony\Component\DependencyInjection\Definition;
@ -19,7 +20,7 @@ use Symfony\Component\DependencyInjection\Definition;
*
* @author Marco Pivetta <ocramius@gmail.com>
*/
class RuntimeInstantiatorTest extends \PHPUnit_Framework_TestCase
class RuntimeInstantiatorTest extends TestCase
{
/**
* @var RuntimeInstantiator

View File

@ -11,6 +11,7 @@
namespace Symfony\Bridge\ProxyManager\Tests\LazyProxy\PhpDumper;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use Symfony\Component\DependencyInjection\Definition;
@ -19,7 +20,7 @@ use Symfony\Component\DependencyInjection\Definition;
*
* @author Marco Pivetta <ocramius@gmail.com>
*/
class ProxyDumperTest extends \PHPUnit_Framework_TestCase
class ProxyDumperTest extends TestCase
{
/**
* @var ProxyDumper

View File

@ -2,11 +2,12 @@
namespace Symfony\Bridge\Twig\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\AppVariable;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
class AppVariableTest extends \PHPUnit_Framework_TestCase
class AppVariableTest extends TestCase
{
/**
* @var AppVariable

View File

@ -11,12 +11,13 @@
namespace Symfony\Bridge\Twig\Tests\Command;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Command\LintCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Tester\CommandTester;
class LintCommandTest extends \PHPUnit_Framework_TestCase
class LintCommandTest extends TestCase
{
private $files;

View File

@ -11,6 +11,7 @@
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\AssetExtension;
use Symfony\Component\Asset\Package;
use Symfony\Component\Asset\Packages;
@ -18,7 +19,7 @@ use Symfony\Component\Asset\PathPackage;
use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy;
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
class AssetExtensionTest extends \PHPUnit_Framework_TestCase
class AssetExtensionTest extends TestCase
{
/**
* @group legacy

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\CodeExtension;
class CodeExtensionTest extends \PHPUnit_Framework_TestCase
class CodeExtensionTest extends TestCase
{
protected $helper;

View File

@ -11,11 +11,12 @@
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\DumpExtension;
use Symfony\Component\VarDumper\VarDumper;
use Symfony\Component\VarDumper\Cloner\VarCloner;
class DumpExtensionTest extends \PHPUnit_Framework_TestCase
class DumpExtensionTest extends TestCase
{
/**
* @dataProvider getDumpTags

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\ExpressionExtension;
class ExpressionExtensionTest extends \PHPUnit_Framework_TestCase
class ExpressionExtensionTest extends TestCase
{
protected $helper;

View File

@ -11,12 +11,13 @@
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\HttpFoundationExtension;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\RequestContext;
class HttpFoundationExtensionTest extends \PHPUnit_Framework_TestCase
class HttpFoundationExtensionTest extends TestCase
{
/**
* @dataProvider getGenerateAbsoluteUrlData()

View File

@ -11,12 +11,13 @@
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\HttpKernelExtension;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Fragment\FragmentHandler;
class HttpKernelExtensionTest extends \PHPUnit_Framework_TestCase
class HttpKernelExtensionTest extends TestCase
{
/**
* @expectedException \Twig_Error_Runtime

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\RoutingExtension;
class RoutingExtensionTest extends \PHPUnit_Framework_TestCase
class RoutingExtensionTest extends TestCase
{
/**
* @dataProvider getEscapingTemplates

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\StopwatchExtension;
class StopwatchExtensionTest extends \PHPUnit_Framework_TestCase
class StopwatchExtensionTest extends TestCase
{
/**
* @expectedException \Twig_Error_Syntax

View File

@ -11,12 +11,13 @@
namespace Symfony\Bridge\Twig\Tests\Extension;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Component\Translation\Translator;
use Symfony\Component\Translation\MessageSelector;
use Symfony\Component\Translation\Loader\ArrayLoader;
class TranslationExtensionTest extends \PHPUnit_Framework_TestCase
class TranslationExtensionTest extends TestCase
{
public function testEscaping()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Twig\Tests\Node;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Node\DumpNode;
class DumpNodeTest extends \PHPUnit_Framework_TestCase
class DumpNodeTest extends TestCase
{
public function testNoVar()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Twig\Tests\Node;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Node\FormThemeNode;
class FormThemeTest extends \PHPUnit_Framework_TestCase
class FormThemeTest extends TestCase
{
public function testConstructor()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Twig\Tests\Node;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode;
class SearchAndRenderBlockNodeTest extends \PHPUnit_Framework_TestCase
class SearchAndRenderBlockNodeTest extends TestCase
{
public function testCompileWidget()
{

View File

@ -11,12 +11,13 @@
namespace Symfony\Bridge\Twig\Tests\Node;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Node\TransNode;
/**
* @author Asmir Mustafic <goetas@gmail.com>
*/
class TransNodeTest extends \PHPUnit_Framework_TestCase
class TransNodeTest extends TestCase
{
public function testCompileStrict()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Twig\Tests\NodeVisitor;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\NodeVisitor\Scope;
class ScopeTest extends \PHPUnit_Framework_TestCase
class ScopeTest extends TestCase
{
public function testScopeInitiation()
{

View File

@ -11,10 +11,11 @@
namespace Symfony\Bridge\Twig\Tests\NodeVisitor;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\NodeVisitor\TranslationDefaultDomainNodeVisitor;
use Symfony\Bridge\Twig\NodeVisitor\TranslationNodeVisitor;
class TranslationDefaultDomainNodeVisitorTest extends \PHPUnit_Framework_TestCase
class TranslationDefaultDomainNodeVisitorTest extends TestCase
{
private static $message = 'message';
private static $domain = 'domain';

View File

@ -11,9 +11,10 @@
namespace Symfony\Bridge\Twig\Tests\NodeVisitor;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\NodeVisitor\TranslationNodeVisitor;
class TranslationNodeVisitorTest extends \PHPUnit_Framework_TestCase
class TranslationNodeVisitorTest extends TestCase
{
/** @dataProvider getMessagesExtractionTestData */
public function testMessagesExtraction(\Twig_Node $node, array $expectedMessages)

View File

@ -11,10 +11,11 @@
namespace Symfony\Bridge\Twig\Tests\TokenParser;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\TokenParser\FormThemeTokenParser;
use Symfony\Bridge\Twig\Node\FormThemeNode;
class FormThemeTokenParserTest extends \PHPUnit_Framework_TestCase
class FormThemeTokenParserTest extends TestCase
{
/**
* @dataProvider getTestsForFormTheme

View File

@ -11,11 +11,12 @@
namespace Symfony\Bridge\Twig\Tests\Translation;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\Extension\TranslationExtension;
use Symfony\Bridge\Twig\Translation\TwigExtractor;
use Symfony\Component\Translation\MessageCatalogue;
class TwigExtractorTest extends \PHPUnit_Framework_TestCase
class TwigExtractorTest extends TestCase
{
/**
* @dataProvider getExtractData

View File

@ -11,10 +11,11 @@
namespace Symfony\Bridge\Twig\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Bridge\Twig\TwigEngine;
use Symfony\Component\Templating\TemplateReference;
class TwigEngineTest extends \PHPUnit_Framework_TestCase
class TwigEngineTest extends TestCase
{
public function testExistsWithTemplateInstances()
{

View File

@ -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()
{

View File

@ -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()
{

View File

@ -0,0 +1,35 @@
<?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.
*/
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* @author Christian Flothmann <christian.flothmann@sensiolabs.de>
*/
class DataCollectorTranslatorPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
{
if (!$container->has('translator')) {
return;
}
$translatorClass = $container->findDefinition('translator')->getClass();
if (!is_subclass_of($translatorClass, 'Symfony\Component\Translation\TranslatorBagInterface')) {
$container->removeDefinition('translator.data_collector');
$container->removeDefinition('data_collector.translation');
}
}
}

View File

@ -16,6 +16,7 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddValidatorInit
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FormPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\PropertyInfoPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TemplatingPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RoutingResolverPass;
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\ProfilerPass;
@ -92,6 +93,7 @@ class FrameworkBundle extends Bundle
$container->addCompilerPass(new FragmentRendererPass(), PassConfig::TYPE_AFTER_REMOVING);
$container->addCompilerPass(new SerializerPass());
$container->addCompilerPass(new PropertyInfoPass());
$container->addCompilerPass(new DataCollectorTranslatorPass());
if ($container->getParameter('kernel.debug')) {
$container->addCompilerPass(new UnusedTagsPass(), PassConfig::TYPE_AFTER_REMOVING);

View File

@ -11,6 +11,7 @@
namespace Symfony\Bundle\FrameworkBundle\Test;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\ResettableContainerInterface;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpKernel\KernelInterface;
@ -20,7 +21,7 @@ use Symfony\Component\HttpKernel\KernelInterface;
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class KernelTestCase extends \PHPUnit_Framework_TestCase
abstract class KernelTestCase extends TestCase
{
protected static $class;

View File

@ -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
class RouterDebugCommandTest extends TestCase
{
public function testDebugAllRoutes()
{

View File

@ -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;
@ -19,7 +20,7 @@ use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\RequestContext;
class RouterMatchCommandTest extends \PHPUnit_Framework_TestCase
class RouterMatchCommandTest extends TestCase
{
public function testWithMatchPath()
{

View File

@ -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;

View File

@ -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\TranslationUpdateCommand;
@ -18,7 +19,7 @@ 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;

View File

@ -11,6 +11,7 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Style\SymfonyStyle;
@ -22,7 +23,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
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)

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\AddCacheWarmerPass;
class AddCacheWarmerPassTest extends \PHPUnit_Framework_TestCase
class AddCacheWarmerPassTest extends TestCase
{
public function testThatCacheWarmersAreProcessedInPriorityOrder()
{

View File

@ -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()
{

View File

@ -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()
{

View File

@ -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()
{

View File

@ -0,0 +1,94 @@
<?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.
*/
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
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
{
private $container;
private $dataCollectorTranslatorPass;
protected function setUp()
{
$this->container = new ContainerBuilder();
$this->dataCollectorTranslatorPass = new DataCollectorTranslatorPass();
$this->container->register('translator.data_collector', 'Symfony\Component\Translation\DataCollectorTranslator')
->setPublic(false)
->setDecoratedService('translator')
->setArguments(array(new Reference('translator.data_collector.inner')))
;
$this->container->register('data_collector.translation', 'Symfony\Component\Translation\DataCollector\TranslationDataCollector')
->setArguments(array(new Reference('translator.data_collector')))
;
}
public function testProcessKeepsDataCollectorTranslatorIfItImplementsTranslatorBagInterface()
{
$this->container->register('translator', 'Symfony\Component\Translation\Translator');
$this->dataCollectorTranslatorPass->process($this->container);
$this->assertTrue($this->container->hasDefinition('translator.data_collector'));
}
public function testProcessKeepsDataCollectorIfTranslatorImplementsTranslatorBagInterface()
{
$this->container->register('translator', 'Symfony\Component\Translation\Translator');
$this->dataCollectorTranslatorPass->process($this->container);
$this->assertTrue($this->container->hasDefinition('data_collector.translation'));
}
public function testProcessRemovesDataCollectorTranslatorIfItDoesNotImplementTranslatorBagInterface()
{
$this->container->register('translator', 'Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\TranslatorWithTranslatorBag');
$this->dataCollectorTranslatorPass->process($this->container);
$this->assertFalse($this->container->hasDefinition('translator.data_collector'));
}
public function testProcessRemovesDataCollectorIfTranslatorDoesNotImplementTranslatorBagInterface()
{
$this->container->register('translator', 'Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\TranslatorWithTranslatorBag');
$this->dataCollectorTranslatorPass->process($this->container);
$this->assertFalse($this->container->hasDefinition('data_collector.translation'));
}
}
class TranslatorWithTranslatorBag implements TranslatorInterface
{
public function trans($id, array $parameters = array(), $domain = null, $locale = null)
{
}
public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null)
{
}
public function setLocale($locale)
{
}
public function getLocale()
{
}
}

View File

@ -11,6 +11,7 @@
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;
@ -18,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FragmentRenderer
/**
* @group legacy
*/
class LegacyFragmentRendererPassTest extends \PHPUnit_Framework_TestCase
class LegacyFragmentRendererPassTest extends TestCase
{
/**
* Tests that content rendering not implementing FragmentRendererInterface

View File

@ -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;
@ -19,7 +20,7 @@ use Symfony\Component\DependencyInjection\Reference;
/**
* @group legacy
*/
class LegacyTemplatingAssetHelperPassTest extends \PHPUnit_Framework_TestCase
class LegacyTemplatingAssetHelperPassTest extends TestCase
{
public function getScopesTests()
{

View File

@ -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()
{

View File

@ -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;

View File

@ -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;
@ -19,7 +20,7 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass;
*
* @author Javier Lopez <f12loalf@gmail.com>
*/
class SerializerPassTest extends \PHPUnit_Framework_TestCase
class SerializerPassTest extends TestCase
{
public function testThrowExceptionWhenNoNormalizers()
{

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\TranslatorPass;
class TranslatorPassTest extends \PHPUnit_Framework_TestCase
class TranslatorPassTest extends TestCase
{
public function testValidCollector()
{

View File

@ -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()
{

View File

@ -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()
{

View File

@ -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()
{

View File

@ -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()
{

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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()
{

View File

@ -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
{
}

View File

@ -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;

View File

@ -11,11 +11,12 @@
namespace Symfony\Bundle\FrameworkBundle\Tests\Validator;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\Validator\Constraints\Blank as BlankConstraint;
class ConstraintValidatorFactoryTest extends \PHPUnit_Framework_TestCase
class ConstraintValidatorFactoryTest extends TestCase
{
public function testGetInstanceCreatesValidator()
{

View File

@ -11,13 +11,14 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DataCollector;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Security\Core\Role\RoleHierarchy;
class SecurityDataCollectorTest extends \PHPUnit_Framework_TestCase
class SecurityDataCollectorTest extends TestCase
{
public function testCollectWhenSecurityIsDisabled()
{

View File

@ -11,13 +11,14 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Parameter;
use Symfony\Bundle\SecurityBundle\SecurityBundle;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
abstract class CompleteConfigurationTest extends \PHPUnit_Framework_TestCase
abstract class CompleteConfigurationTest extends TestCase
{
private static $containerCache = array();

View File

@ -11,10 +11,11 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\SecurityBundle\DependencyInjection\MainConfiguration;
use Symfony\Component\Config\Definition\Processor;
class MainConfigurationTest extends \PHPUnit_Framework_TestCase
class MainConfigurationTest extends TestCase
{
/**
* The minimal, required config needed to not have any required validation

View File

@ -11,10 +11,11 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Security\Factory;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class AbstractFactoryTest extends \PHPUnit_Framework_TestCase
class AbstractFactoryTest extends TestCase
{
public function testCreate()
{

View File

@ -11,12 +11,13 @@
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
use Symfony\Bundle\SecurityBundle\SecurityBundle;
use Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Fixtures\UserProvider\DummyProvider;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class SecurityExtensionTest extends \PHPUnit_Framework_TestCase
class SecurityExtensionTest extends TestCase
{
/**
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException

View File

@ -11,11 +11,12 @@
namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\ExtensionPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
class ExtensionPassTest extends \PHPUnit_Framework_TestCase
class ExtensionPassTest extends TestCase
{
public function testProcessDoesNotDropExistingFileLoaderMethodCalls()
{

View File

@ -11,10 +11,11 @@
namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection\Compiler;
use PHPUnit\Framework\TestCase;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Bundle\TwigBundle\DependencyInjection\Compiler\TwigLoaderPass;
class TwigLoaderPassTest extends \PHPUnit_Framework_TestCase
class TwigLoaderPassTest extends TestCase
{
/**
* @var \PHPUnit_Framework_MockObject_MockObject

View File

@ -11,10 +11,11 @@
namespace Symfony\Bundle\TwigBundle\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\TwigBundle\DependencyInjection\Configuration;
use Symfony\Component\Config\Definition\Processor;
class ConfigurationTest extends \PHPUnit_Framework_TestCase
class ConfigurationTest extends TestCase
{
public function testDoNoDuplicateDefaultFormResources()
{

View File

@ -17,7 +17,7 @@ use Symfony\Component\Filesystem\Filesystem;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\TwigBundle\TwigBundle;
class CacheWarmingTest extends \PHPUnit_Framework_TestCase
class CacheWarmingTest extends TestCase
{
public function testCacheIsProperlyWarmedWhenTemplatingIsAvailable()
{

View File

@ -17,7 +17,7 @@ use Symfony\Component\Filesystem\Filesystem;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\TwigBundle\TwigBundle;
class NoTemplatingEntryTest extends \PHPUnit_Framework_TestCase
class NoTemplatingEntryTest extends TestCase
{
public function test()
{

View File

@ -11,6 +11,8 @@
namespace Symfony\Bundle\TwigBundle\Tests;
class TestCase extends \PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase as PHPUnitTestCase;
class TestCase extends PHPUnitTestCase
{
}

View File

@ -11,6 +11,7 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests\Command;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\WebProfilerBundle\Command\ExportCommand;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Tester\CommandTester;
@ -19,7 +20,7 @@ use Symfony\Component\HttpKernel\Profiler\Profile;
/**
* @group legacy
*/
class ExportCommandTest extends \PHPUnit_Framework_TestCase
class ExportCommandTest extends TestCase
{
/**
* @expectedException \LogicException

View File

@ -11,6 +11,7 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests\Command;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\WebProfilerBundle\Command\ImportCommand;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Tester\CommandTester;
@ -19,7 +20,7 @@ use Symfony\Component\HttpKernel\Profiler\Profile;
/**
* @group legacy
*/
class ImportCommandTest extends \PHPUnit_Framework_TestCase
class ImportCommandTest extends TestCase
{
public function testExecute()
{

View File

@ -11,11 +11,12 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests\Controller;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController;
use Symfony\Component\HttpKernel\Profiler\Profile;
use Symfony\Component\HttpFoundation\Request;
class ProfilerControllerTest extends \PHPUnit_Framework_TestCase
class ProfilerControllerTest extends TestCase
{
/**
* @dataProvider getEmptyTokenCases

View File

@ -11,10 +11,11 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests\DependencyInjection;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\WebProfilerBundle\DependencyInjection\Configuration;
use Symfony\Component\Config\Definition\Processor;
class ConfigurationTest extends \PHPUnit_Framework_TestCase
class ConfigurationTest extends TestCase
{
/**
* @dataProvider getDebugModes

View File

@ -11,6 +11,7 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests\EventListener;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@ -18,7 +19,7 @@ use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class WebDebugToolbarListenerTest extends \PHPUnit_Framework_TestCase
class WebDebugToolbarListenerTest extends TestCase
{
/**
* @dataProvider getInjectToolbarTests

View File

@ -11,6 +11,8 @@
namespace Symfony\Bundle\WebProfilerBundle\Tests;
class TestCase extends \PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase as PHPUnitTestCase;
class TestCase extends PHPUnitTestCase
{
}

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\Asset\Tests\Context;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Asset\Context\NullContext;
class NullContextTest extends \PHPUnit_Framework_TestCase
class NullContextTest extends TestCase
{
public function testGetBasePath()
{

View File

@ -11,9 +11,10 @@
namespace Symfony\Component\Asset\Tests\Context;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Asset\Context\RequestStackContext;
class RequestStackContextTest extends \PHPUnit_Framework_TestCase
class RequestStackContextTest extends TestCase
{
public function testGetBasePathEmpty()
{

View File

@ -11,11 +11,12 @@
namespace Symfony\Component\Asset\Tests;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Asset\Package;
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy;
class PackageTest extends \PHPUnit_Framework_TestCase
class PackageTest extends TestCase
{
/**
* @dataProvider getConfigs

Some files were not shown because too many files have changed in this diff Show More