Skip to content

Commit 8ed60f2

Browse files
Merge branch '3.4' into 4.3
* 3.4: Remove use of ForwardCompatTrait Remove deprecated methods assertArraySubset
2 parents 7649a00 + bd75653 commit 8ed60f2

38 files changed

+37
-151
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\NullAdapter;
@@ -15,19 +14,17 @@
1514

1615
class AnnotationsCacheWarmerTest extends TestCase
1716
{
18-
use ForwardCompatTestTrait;
19-
2017
private $cacheDir;
2118

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

30-
private function doTearDown()
27+
protected function tearDown()
3128
{
3229
$fs = new Filesystem();
3330
$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\NullAdapter;
@@ -22,8 +21,6 @@
2221

2322
class SerializerCacheWarmerTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
public function testWarmUp()
2825
{
2926
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;
@@ -25,8 +24,6 @@
2524
*/
2625
class TemplatePathsCacheWarmerTest extends TestCase
2726
{
28-
use ForwardCompatTestTrait;
29-
3027
/** @var Filesystem */
3128
private $filesystem;
3229

@@ -41,7 +38,7 @@ class TemplatePathsCacheWarmerTest extends TestCase
4138

4239
private $tmpDir;
4340

44-
private function doSetUp()
41+
protected function setUp()
4542
{
4643
$this->templateFinder = $this
4744
->getMockBuilder(TemplateFinderInterface::class)
@@ -62,7 +59,7 @@ private function doSetUp()
6259
$this->filesystem->mkdir($this->tmpDir);
6360
}
6461

65-
private function doTearDown()
62+
protected function tearDown()
6663
{
6764
$this->filesystem->remove($this->tmpDir);
6865
}

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\NullAdapter;
@@ -22,8 +21,6 @@
2221

2322
class ValidatorCacheWarmerTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
public function testWarmUp()
2825
{
2926
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,21 +23,19 @@
2423

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

34-
private function doSetUp()
31+
protected function setUp()
3532
{
3633
$this->fs = new Filesystem();
3734
$this->kernel = new TestAppKernel('test', true);
3835
$this->fs->mkdir($this->kernel->getProjectDir());
3936
}
4037

41-
private function doTearDown()
38+
protected function tearDown()
4239
{
4340
$this->fs->remove($this->kernel->getProjectDir());
4441
}

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;
@@ -22,8 +21,6 @@
2221

2322
class TranslationDebugCommandTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
private $fs;
2825
private $translationDir;
2926

@@ -130,15 +127,15 @@ public function testDebugInvalidDirectory()
130127
$tester->execute(['locale' => 'en', 'bundle' => 'dir']);
131128
}
132129

133-
private function doSetUp()
130+
protected function setUp()
134131
{
135132
$this->fs = new Filesystem();
136133
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
137134
$this->fs->mkdir($this->translationDir.'/translations');
138135
$this->fs->mkdir($this->translationDir.'/templates');
139136
}
140137

141-
private function doTearDown()
138+
protected function tearDown()
142139
{
143140
$this->fs->remove($this->translationDir);
144141
}

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;
@@ -22,8 +21,6 @@
2221

2322
class TranslationUpdateCommandTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
private $fs;
2825
private $translationDir;
2926

@@ -108,15 +105,15 @@ public function testWriteMessagesForSpecificDomain()
108105
$this->assertRegExp('/Translation files were successfully updated./', $tester->getDisplay());
109106
}
110107

111-
private function doSetUp()
108+
protected function setUp()
112109
{
113110
$this->fs = new Filesystem();
114111
$this->translationDir = sys_get_temp_dir().'/'.uniqid('sf_translation', true);
115112
$this->fs->mkdir($this->translationDir.'/translations');
116113
$this->fs->mkdir($this->translationDir.'/templates');
117114
}
118115

119-
private function doTearDown()
116+
protected function tearDown()
120117
{
121118
$this->fs->remove($this->translationDir);
122119
}

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,7 +12,6 @@
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;
@@ -22,19 +21,17 @@
2221
*/
2322
class ControllerNameParserTest extends TestCase
2423
{
25-
use ForwardCompatTestTrait;
26-
2724
protected $loader;
2825

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

37-
private function doTearDown()
34+
protected function tearDown()
3835
{
3936
$this->loader->unregister();
4037
$this->loader = null;

Tests/Controller/ControllerTraitTest.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\Controller;
1313

1414
use Fig\Link\Link;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
1716
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1817
use Symfony\Component\DependencyInjection\Container;
@@ -33,8 +32,6 @@
3332

3433
abstract class ControllerTraitTest extends TestCase
3534
{
36-
use ForwardCompatTestTrait;
37-
3835
abstract protected function createController();
3936

4037
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/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;
@@ -25,11 +24,9 @@
2524
*/
2625
class CachePoolPassTest extends TestCase
2726
{
28-
use ForwardCompatTestTrait;
29-
3027
private $cachePoolPass;
3128

32-
private function doSetUp()
29+
protected function setUp()
3330
{
3431
$this->cachePoolPass = new CachePoolPass();
3532
}

Tests/DependencyInjection/Compiler/CachePoolPrunerPassTest.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\CachePoolPrunerPass;
1716
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
1817
use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
@@ -25,8 +24,6 @@
2524
*/
2625
class CachePoolPrunerPassTest extends TestCase
2726
{
28-
use ForwardCompatTestTrait;
29-
3027
public function testCompilerPassReplacesCommandArgument()
3128
{
3229
$container = new ContainerBuilder();

Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,17 @@
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\DataCollectorTranslatorPass;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
1817
use Symfony\Component\DependencyInjection\Reference;
1918
use Symfony\Contracts\Translation\TranslatorInterface;
2019

2120
class DataCollectorTranslatorPassTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
private $container;
2623
private $dataCollectorTranslatorPass;
2724

28-
private function doSetUp()
25+
protected function setUp()
2926
{
3027
$this->container = new ContainerBuilder();
3128
$this->dataCollectorTranslatorPass = new DataCollectorTranslatorPass();

Tests/DependencyInjection/Compiler/ProfilerPassTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
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\ProfilerPass;
1716
use Symfony\Component\DependencyInjection\ContainerBuilder;
1817

1918
class ProfilerPassTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
/**
2421
* Tests that collectors that specify a template but no "id" will throw
2522
* an exception (both are needed if the template is specified).

0 commit comments

Comments
 (0)