8000 Updated PHPUnit namespaces · symfony/symfony@8fff31f · GitHub
[go: up one dir, main page]

Skip to content

Commit 8fff31f

Browse files
committed
Updated PHPUnit namespaces
1 parent 33bae93 commit 8fff31f

File tree

41 files changed

+87
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+87
-45
lines changed

src/Symfony/Bridge/Doctrine/Tests/PropertyInfo/DoctrineExtractorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414
use Doctrine\DBAL\Types\Type as DBALType;
1515
use Doctrine\ORM\EntityManager;
1616
use Doctrine\ORM\Tools\Setup;
17+
use PHPUnit\Framework\TestCase;
1718
use Symfony\Bridge\Doctrine\PropertyInfo\DoctrineExtractor;
1819
use Symfony\Component\PropertyInfo\Type;
1920

2021
/**
2122
* @author Kévin Dunglas <dunglas@gmail.com>
2223
*/
23-
class DoctrineExtractorTest extends \PHPUnit_Framework_TestCase
24+
class DoctrineExtractorTest extends TestCase
2425
{
2526
/**
2627
* @var DoctrineExtractor

src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
namespace Symfony\Bridge\PhpUnit;
1313

1414
use Doctrine\Common\Annotations\AnnotationRegistry;
15+
use PHPUnit\Framework\BaseTestListener;
16+
use PHPUnit\Framework\TestCase;
1517

1618
/**
1719
* Collects and replays skipped tests.
1820
*
1921
* @author Nicolas Grekas <p@tchwork.com>
2022
*/
21-
class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
23+
class SymfonyTestsListener extends BaseTestListener
2224
{
2325
private static $globallyEnabled = false;
2426
private $state = -1;
@@ -106,7 +108,7 @@ public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
106108
} elseif (2 === $this->state) {
107109
$skipped = array();
108110
foreach ($suite->tests() as $test) {
109-
if (!$test instanceof \PHPUnit_Framework_TestCase
111+
if (!$test instanceof TestCase
110112
|| isset($this->wasSkipped[$suiteName]['*'])
111113
|| isset($this->wasSkipped[$suiteName][$test->getName()])) {
112114
$skipped[] = $test;
@@ -119,7 +121,7 @@ public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
119121
public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
120122
{
121123
if (0 < $this->state) {
122-
if ($test instanceof \PHPUnit_Framework_TestCase) {
124+
if ($test instanceof TestCase) {
123125
$class = get_class($test);
124126
$method = $test->getName();
125127
} else {
@@ -133,7 +135,7 @@ public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $ti
133135

134136
public function startTest(\PHPUnit_Framework_Test $test)
135137
{
136-
if (-2 < $this->state && $test instanceof \PHPUnit_Framework_TestCase) {
138+
if (-2 < $this->state && $test instanceof TestCase) {
137139
$groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName(false));
138140

139141
if (in_array('time-sensitive', $groups, true)) {
@@ -145,7 +147,7 @@ public function startTest(\PHPUnit_Framework_Test $test)
145147

146148
public function endTest(\PHPUnit_Framework_Test $test, $time)
147149
{
148-
if (-2 < $this->state && $test instanceof \PHPUnit_Framework_TestCase) {
150+
if (-2 < $this->state && $test instanceof TestCase) {
149151
$groups = \PHPUnit_Util_Test::getGroups(get_class($test), $test->getName(false));
150152

151153
if (in_array('time-sensitive', $groups, true)) {

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/ConfigCachePassTest.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\ConfigCachePass;
1617

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

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.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\Bundle\FrameworkBundle\DependencyInjection\Compiler\DataCollectorTranslatorPass;
1516
use Symfony\Component\DependencyInjection\ContainerBuilder;
1617
use Symfony\Component\DependencyInjection\Reference;
1718
use Symfony\Component\Translation\TranslatorInterface;
1819

19-
class DataCollectorTranslatorPassTest extends \PHPUnit_Framework_TestCase
20+
class DataCollectorTranslatorPassTest extends TestCase
2021
{
2122
private $container;
2223
private $dataCollectorTranslatorPass;

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/FormPassTest.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\FormPass;
1516
use Symfony\Component\DependencyInjection\ContainerBuilder;
1617
use Symfony\Component\DependencyInjection\Definition;
@@ -20,7 +21,7 @@
2021
/**
2122
* @author Bernhard Schussek <bschussek@gmail.com>
2223
*/
23-
class FormPassTest extends \PHPUnit_Framework_TestCase
24+
class FormPassTest extends TestCase
2425
{
2526
public function testDoNothingIfFormExtensionNotLoaded()
2627
{

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/PropertyInfoPassTest.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\Bundle\FrameworkBundle\DependencyInjection\Compiler\PropertyInfoPass;
1516
use Symfony\Component\DependencyInjection\Reference;
1617

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

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/UnusedTagsPassTest.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\UnusedTagsPass;
1516

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

src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.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\Kernel;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\HttpFoundation\Request;
1516

16-
class MicroKernelTraitTest extends \PHPUnit_Framework_TestCase
17+
class MicroKernelTraitTest extends TestCase
1718
{
1819
/**
1920
* @requires PHP 5.4

src/Symfony/Bundle/FrameworkBundle/Tests/Routing/DelegatingLoaderTest.php

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

33
namespace Symfony\Bundle\FrameworkBundle\Tests\Routing;
44

5+
use PHPUnit\Framework\TestCase;
56
use Psr\Log\NullLogger;
67
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
78
use Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader;
89
use Symfony\Component\Config\Loader\LoaderResolver;
910

10-
class DelegatingLoaderTest extends \PHPUnit_Framework_TestCase
11+
class DelegatingLoaderTest extends TestCase
1112
{
1213
/** @var ControllerNameParser */
1314
private $controllerNameParser;

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Security/Factory/GuardAuthenticationFactoryTest.php

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

1212
namespace Symfony\Bundle\SecurityBundle\Tests\DependencyInjection\Security\Factory;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory\GuardAuthenticationFactory;
1516
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
1617
use Symfony\Component\DependencyInjection\ContainerBuilder;
1718
use Symfony\Component\DependencyInjection\Reference;
1819

19-
class GuardAuthenticationFactoryTest extends \PHPUnit_Framework_TestCase
20+
class GuardAuthenticationFactoryTest extends TestCase
2021
{
2122
/**
2223
* @dataProvider getValidConfigurationTests

src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php

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

1212
namespace Symfony\Component\Config\Tests\Resource;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Config\Resource\FileExistenceResource;
1516

16-
class FileExistenceResourceTest extends \PHPUnit_Framework_TestCase
17+
class FileExistenceResourceTest extends TestCase
1718
{
1819
protected $resource;
1920
protected $file;

src/Symfony/Component/Config/Tests/ResourceCheckerConfigCacheTest.php

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

1212
namespace Symfony\Component\Config\Tests;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Config\Tests\Resource\ResourceStub;
1516
use Symfony\Component\Config\Resource\FileResource;
1617
use Symfony\Component\Config\ResourceCheckerConfigCache;
1718

18-
class ResourceCheckerConfigCacheTest extends \PHPUnit_Framework_TestCase
19+
class ResourceCheckerConfigCacheTest extends TestCase
1920
{
2021
private $cacheFile = null;
2122

src/Symfony/Component/Console/Tests/Helper/ProgressIndicatorTest.php

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

33
namespace Symfony\Component\Console\Tests\Helper;
44

5+
use PHPUnit\Framework\TestCase;
56
use Symfony\Component\Console\Helper\ProgressIndicator;
67
use Symfony\Component\Console\Output\StreamOutput;
78

89
/**
910
* @group time-sensitive
1011
*/
11-
class ProgressIndicatorTest extends \PHPUnit_Framework_TestCase
12+
class ProgressIndicatorTest extends TestCase
1213
{
1314
public function testDefaultIndicator()
1415
{

src/Symfony/Component/CssSelector/Tests/CssSelectorConverterTest.php

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

1212
namespace Symfony\Component\CssSelector\Tests;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\CssSelector\CssSelectorConverter;
1516

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

src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php

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

1212
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\DependencyInjection\Compiler\AutowirePass;
1516
use Symfony\Component\DependencyInjection\ContainerBuilder;
1617
use Symfony\Component\DependencyInjection\Reference;
1718

1819
/**
1920
* @author Kévin Dunglas <dunglas@gmail.com>
2021
*/
21-
class AutowirePassTest extends \PHPUnit_Framework_TestCase
22+
class AutowirePassTest extends TestCase
2223
{
2324
public function testProcess()
2425
{

src/Symfony/Component/DependencyInjection/Tests/Loader/DirectoryLoaderTest.php

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

1212
namespace Symfony\Component\DependencyInjection\Tests\Loader;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\DependencyInjection\ContainerBuilder;
1516
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
1617
use Symfony\Component\DependencyInjection\Loader\IniFileLoader;
@@ -19,7 +20,7 @@
1920
use Symfony\Component\Config\Loader\LoaderResolver;
2021
use Symfony\Component\Config\FileLocator;
2122

22-
class DirectoryLoaderTest extends \PHPUnit_Framework_TestCase
23+
class DirectoryLoaderTest extends TestCase
2324
{
2425
private static $fixturesPath;
2526

src/Symfony/Component/Form/Tests/Extension/DependencyInjection/DependencyInjectionExtensionTest.php

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

1212
namespace Symfony\Component\Form\Tests\Extension\DependencyInjection;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
1516
use Symfony\Component\Form\Extension\DependencyInjection\DependencyInjectionExtension;
1617

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

src/Symfony/Component/Form/Tests/Util/StringUtilTest.php

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

1212
namespace Symfony\Component\Form\Tests\Util;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Form\Util\StringUtil;
1516

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

src/Symfony/Component/Ldap/Tests/LdapClientTest.php

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

1212
namespace Symfony\Component\Ldap\Tests;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\Ldap\LdapClient;
1516
use Symfony\Polyfill\Php56\Php56 as p;
1617

1718
/**
1819
* @requires extension ldap
1920
*/
20-
class LdapClientTest extends \PHPUnit_Framework_TestCase
21+
class LdapClientTest extends TestCase
2122
{
2223
public function testLdapEscape()
2324
{

src/Symfony/Component/PropertyInfo/Tests/Extractors/PhpDocExtractorTest.php

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

1212
namespace Symfony\Component\PropertyInfo\Tests\PhpDocExtractors;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor;
1516
use Symfony\Component\PropertyInfo\Type;
1617

1718
/**
1819
* @author Kévin Dunglas <dunglas@gmail.com>
1920
*/
20-
class PhpDocExtractorTest extends \PHPUnit_Framework_TestCase
21+
class PhpDocExtractorTest extends TestCase
2122
{
2223
/**
2324
* @var PhpDocExtractor

src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php

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

1212
namespace Symfony\Component\PropertyInfo\Tests\Extractor;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
1516
use Symfony\Component\PropertyInfo\Type;
1617

1718
/**
1819
* @author Kévin Dunglas <dunglas@gmail.com>
1920
*/
20-
class ReflectionExtractorTest extends \PHPUnit_Framework_TestCase
21+
class ReflectionExtractorTest extends TestCase
2122
{
2223
/**
2324
* @var ReflectionExtractor

src/Symfony/Component/PropertyInfo/Tests/Extractors/SerializerExtractorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
namespace Symfony\Component\PropertyInfo\PropertyInfo\Tests\Extractors;
1313

1414
use Doctrine\Common\Annotations\AnnotationReader;
15+
use PHPUnit\Framework\TestCase;
1516
use Symfony\Component\PropertyInfo\Extractor\SerializerExtractor;
1617
use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactory;
1718
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
1819

1920
/**
2021
* @author Kévin Dunglas <dunglas@gmail.com>
2122
*/
22-
class SerializerExtractorTest extends \PHPUnit_Framework_TestCase
23+
class SerializerExtractorTest extends TestCase
2324
{
2425
/**
2526
* @var SerializerExtractor

src/Symfony/Component/PropertyInfo/Tests/PropertyInfoExtractorTest.php

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

1212
namespace Symfony\Component\PropertyInfo\Tests;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
1516
use Symfony\Component\PropertyInfo\Tests\Fixtures\DummyExtractor;
1617
use Symfony\Component\PropertyInfo\Tests\Fixtures\NullExtractor;
@@ -19,7 +20,7 @@
1920
/**
2021
* @author Kévin Dunglas <dunglas@gmail.com>
2122
*/
22-
class PropertyInfoExtractorTest extends \PHPUnit_Framework_TestCase
23+
class PropertyInfoExtractorTest extends TestCase
2324
{
2425
/**
2526
* @var PropertyInfoExtractor

src/Symfony/Component/PropertyInfo/Tests/TypeTest.php

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

1212
namespace Symfony\Component\PropertyInfo\Tests;
1313

14+
use PHPUnit\Framework\TestCase;
1415
use Symfony\Component\PropertyInfo\Type;
1516

1617
/**
1718
* @author Kévin Dunglas <dunglas@gmail.com>
1819
*/
19-
class TypeTest extends \PHPUnit_Framework_TestCase
20+
class TypeTest extends TestCase
2021
{
2122
public function testConstruct()
2223
{

0 commit comments

Comments
 (0)
0