Skip to content

Commit bd75653

Browse files
committed
Remove use of ForwardCompatTrait
1 parent 2c4b231 commit bd75653

Some content is hidden

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

44 files changed

+37
-169
lines changed

Tests/CacheWarmer/AnnotationsCacheWarmerTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Doctrine\Common\Annotations\AnnotationReader;
66
use Doctrine\Common\Annotations\CachedReader;
77
use Doctrine\Common\Annotations\Reader;
8-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
98
use Symfony\Bundle\FrameworkBundle\CacheWarmer\AnnotationsCacheWarmer;
109
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1110
use Symfony\Component\Cache\Adapter\ArrayAdapter;
@@ -16,19 +15,17 @@
1615

1716
class AnnotationsCacheWarmerTest extends TestCase
1817
{
19-
use ForwardCompatTestTrait;
20-
2118
private $cacheDir;
2219

23-
private function doSetUp()
20+
protected function setUp()
2421
{
2522
$this->cacheDir = sys_get_temp_dir().'/'.uniqid();
2623
$fs = new Filesystem();
2724
$fs->mkdir($this->cacheDir);
2825
parent::setUp();
2926
}
3027

31-
private function doTearDown()
28+
protected function tearDown()
3229
{
3330
$fs = new Filesystem();
3431
$fs->remove($this->cacheDir);

Tests/CacheWarmer/SerializerCacheWarmerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

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

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Bundle\FrameworkBundle\CacheWarmer\SerializerCacheWarmer;
1615
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1716
use Symfony\Component\Cache\Adapter\ArrayAdapter;
@@ -23,8 +22,6 @@
2322

2423
class SerializerCacheWarmerTest extends TestCase
2524
{
26-
use ForwardCompatTestTrait;
27-
2825
public function testWarmUp()
2926
{
3027
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {

Tests/CacheWarmer/TemplatePathsCacheWarmerTest.php

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

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

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface;
1615
use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplatePathsCacheWarmer;
1716
use Symfony\Bundle\FrameworkBundle\Templating\Loader\TemplateLocator;
@@ -22,8 +21,6 @@
2221

2322
class TemplatePathsCacheWarmerTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
/** @var Filesystem */
2825
private $filesystem;
2926

@@ -38,7 +35,7 @@ class TemplatePathsCacheWarmerTest extends TestCase
3835

3936
private $tmpDir;
4037

41-
private function doSetUp()
38+
protected function setUp()
4239
{
4340
$this->templateFinder = $this
4441
->getMockBuilder(TemplateFinderInterface::class)
@@ -59,7 +56,7 @@ private function doSetUp()
5956
$this->filesystem->mkdir($this->tmpDir);
6057
}
6158

62-
private function doTearDown()
59+
protected function tearDown()
6360
{
6461
$this->filesystem->remove($this->tmpDir);
6562
}

Tests/CacheWarmer/ValidatorCacheWarmerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
1313

1414
use PHPUnit\Framework\Warning;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer;
1716
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1817
use Symfony\Component\Cache\Adapter\ArrayAdapter;
@@ -23,8 +22,6 @@
2322

2423
class ValidatorCacheWarmerTest extends TestCase
2524
{
26-
use ForwardCompatTestTrait;
27-
2825
public function testWarmUp()
2926
{
3027
if (\PHP_VERSION_ID >= 70400) {

Tests/Command/CacheClearCommand/CacheClearCommandTest.php

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

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

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Bundle\FrameworkBundle\Console\Application;
1615
use Symfony\Bundle\FrameworkBundle\Tests\Command\CacheClearCommand\Fixture\TestAppKernel;
1716
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
@@ -24,15 +23,13 @@
2423

2524
class CacheClearCommandTest extends TestCase
2625
{
27-
use ForwardCompatTestTrait;
28-
2926
/** @var TestAppKernel */
3027
private $kernel;
3128
/** @var Filesystem */
3229
private $fs;
3330
private $rootDir;
3431

35-
private function doSetUp()
32+
protected function setUp()
3633
{
3734
$this->fs = new Filesystem();
3835
$this->kernel = new TestAppKernel('test', true);
@@ -41,7 +38,7 @@ private function doSetUp()
4138
$this->fs->mkdir($this->rootDir);
4239
}
4340

44-
private function doTearDown()
41+
protected function tearDown()
4542
{
4643
$this->fs->remove($this->rootDir);
4744
}

Tests/Command/RouterDebugCommandTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand;
1716
use Symfony\Bundle\FrameworkBundle\Console\Application;
1817
use Symfony\Component\Console\Tester\CommandTester;
@@ -22,8 +21,6 @@
2221

2322
class RouterDebugCommandTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
public function testDebugAllRoutes()
2825
{
2926
$tester = $this->createCommandTester();

Tests/Command/TranslationDebugCommandTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
1716
use Symfony\Bundle\FrameworkBundle\Console\Application;
1817
use Symfony\Component\Console\Tester\CommandTester;
@@ -21,8 +20,6 @@
2120

2221
class TranslationDebugCommandTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
private $fs;
2724
private $translationDir;
2825

@@ -110,7 +107,7 @@ public function testDebugInvalidDirectory()
110107
$tester->execute(['locale' => 'en', 'bundle' => 'dir']);
111108
}
112109

113-
private function doSetUp()
110+
protected function setUp()
114111
{
115112
$this->fs = new Filesystem();
116113
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
@@ -120,7 +117,7 @@ private function doSetUp()
120117
$this->fs->mkdir($this->translationDir.'/templates');
121118
}
122119

123-
private function doTearDown()
120+
protected function tearDown()
124121
{
125122
$this->fs->remove($this->translationDir);
126123
}

Tests/Command/TranslationUpdateCommandTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand;
1716
use Symfony\Bundle\FrameworkBundle\Console\Application;
1817
use Symfony\Component\Console\Tester\CommandTester;
@@ -21,8 +20,6 @@
2120

2221
class TranslationUpdateCommandTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
private $fs;
2724
private $translationDir;
2825

@@ -90,7 +87,7 @@ public function testWriteMessagesForSpecificDomain()
9087
$this->assertRegExp('/Translation files were successfully updated./', $tester->getDisplay());
9188
}
9289

93-
private function doSetUp()
90+
protected function setUp()
9491
{
9592
$this->fs = new Filesystem();
9693
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf2_translation', true);
@@ -100,7 +97,7 @@ private function doSetUp()
10097
$this->fs->mkdir($this->translationDir.'/templates');
10198
}
10299

103-
private function doTearDown()
100+
protected function tearDown()
104101
{
105102
$this->fs->remove($this->translationDir);
106103
}

Tests/Command/YamlLintCommandTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand;
1716
use Symfony\Bundle\FrameworkBundle\Console\Application;
1817
use Symfony\Component\Console\Application as BaseApplication;
@@ -29,8 +28,6 @@
2928
*/
3029
class YamlLintCommandTest extends TestCase
3130
{
32-
use ForwardCompatTestTrait;
33-
3431
private $files;
3532

3633
public function testLintCorrectFile()
@@ -184,13 +181,13 @@ private function getKernelAwareApplicationMock()
184181
return $application;
185182
}
186183

187-
private function doSetUp()
184+
protected function setUp()
188185
{
189186
@mkdir(sys_get_temp_dir().'/yml-lint-test');
190187
$this->files = [];
191188
}
192189

193-
private function doTearDown()
190+
protected function tearDown()
194191
{
195192
foreach ($this->files as $file) {
196193
if (file_exists($file)) {

Tests/Console/Descriptor/TextDescriptorTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,16 @@
1111

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

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Bundle\FrameworkBundle\Console\Descriptor\TextDescriptor;
1615

1716
class TextDescriptorTest extends AbstractDescriptorTest
1817
{
19-
use ForwardCompatTestTrait;
20-
21-
private function doSetUp()
18+
protected function setUp()
2219
{
2320
putenv('COLUMNS=121');
2421
}
2522

26-
private function doTearDown()
23+
protected function tearDown()
2724
{
2825
putenv('COLUMNS');
2926
}

Tests/Controller/ControllerNameParserTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,23 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Controller;
1313

1414
use Composer\Autoload\ClassLoader;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
1716
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1817
use Symfony\Component\HttpKernel\Kernel;
1918

2019
class ControllerNameParserTest extends TestCase
2120
{
22-
use ForwardCompatTestTrait;
23-
2421
protected $loader;
2522

26-
private function doSetUp()
23+
protected function setUp()
2724
{
2825
$this->loader = new ClassLoader();
2926
$this->loader->add('TestBundle', __DIR__.'/../Fixtures');
3027
$this->loader->add('TestApplication', __DIR__.'/../Fixtures');
3128
$this->loader->register();
3229
}
3330

34-
private function doTearDown()
31+
protected function tearDown()
3532
{
3633
$this->loader->unregister();
3734
$this->loader = null;

Tests/Controller/ControllerTraitTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

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

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
1615
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1716
use Symfony\Component\DependencyInjection\Container;
@@ -32,8 +31,6 @@
3231

3332
abstract class ControllerTraitTest extends TestCase
3433
{
35-
use ForwardCompatTestTrait;
36-
3734
abstract protected function createController();
3835

3936
public function testForward()

Tests/Controller/TemplateControllerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

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

14-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1514
use Symfony\Bundle\FrameworkBundle\Controller\TemplateController;
1615
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
1716
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
@@ -21,8 +20,6 @@
2120
*/
2221
class TemplateControllerTest extends TestCase
2322
{
24-
use ForwardCompatTestTrait;
25-
2623
public function testTwig()
2724
{
2825
$twig = $this->getMockBuilder('Twig\Environment')->disableOriginalConstructor()->getMock();

Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConsoleCommandPass;
1716
use Symfony\Component\Console\Command\Command;
1817
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -23,8 +22,6 @@
2322
*/
2423
class AddConsoleCommandPassTest extends TestCase
2524
{
26-
use ForwardCompatTestTrait;
27-
2825
/**
2926
* @dataProvider visibilityProvider
3027
*/

Tests/DependencyInjection/Compiler/AddConstraintValidatorsPassTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddConstraintValidatorsPass;
1716
use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
1817
use Symfony\Component\DependencyInjection\ContainerBuilder;
@@ -25,8 +24,6 @@
2524
*/
2625
class AddConstraintValidatorsPassTest extends TestCase
2726
{
28-
use ForwardCompatTestTrait;
29-
3027
public function testThatConstraintValidatorServicesAreProcessed()
3128
{
3229
$container = new ContainerBuilder();

Tests/DependencyInjection/Compiler/CachePoolPassTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\CachePoolPass;
1716
use Symfony\Component\Cache\Adapter\ArrayAdapter;
1817
use Symfony\Component\DependencyInjection\ChildDefinition;
@@ -22,11 +21,9 @@
2221

2322
class CachePoolPassTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
private $cachePoolPass;
2825

29-
private function doSetUp()
26+
protected function setUp()
3027
{
3128
$this->cachePoolPass = new CachePoolPass();
3229
}

0 commit comments

Comments
 (0)