Skip to content

Commit d4883d9

Browse files
Merge branch '3.4' into 4.4
* 3.4: [FrameworkBundle] Removed detection of Serializer < 3.2 Update pull request template for 5.1.
2 parents bd469af + 59cf8c9 commit d4883d9

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

Tests/CacheWarmer/SerializerCacheWarmerTest.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,13 @@
1515
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1616
use Symfony\Component\Cache\Adapter\NullAdapter;
1717
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
18-
use Symfony\Component\Serializer\Mapping\Factory\CacheClassMetadataFactory;
1918
use Symfony\Component\Serializer\Mapping\Loader\XmlFileLoader;
2019
use Symfony\Component\Serializer\Mapping\Loader\YamlFileLoader;
2120

2221
class SerializerCacheWarmerTest extends TestCase
2322
{
2423
public function testWarmUp()
2524
{
26-
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {
27-
$this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.');
28-
}
29-
3025
$loaders = [
3126
new XmlFileLoader(__DIR__.'/../Fixtures/Serialization/Resources/person.xml'),
3227
new YamlFileLoader(__DIR__.'/../Fixtures/Serialization/Resources/author.yml'),
@@ -48,10 +43,6 @@ public function testWarmUp()
4843

4944
public function testWarmUpWithoutLoader()
5045
{
51-
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {
52-
$this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.');
53-
}
54-
5546
$file = sys_get_temp_dir().'/cache-serializer-without-loader.php';
5647
@unlink($file);
5748

@@ -67,10 +58,6 @@ public function testWarmUpWithoutLoader()
6758
*/
6859
public function testClassAutoloadException()
6960
{
70-
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {
71-
$this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.');
72-
}
73-
7461
$this->assertFalse(class_exists($mappedClass = 'AClassThatDoesNotExist_FWB_CacheWarmer_SerializerCacheWarmerTest', false));
7562

7663
$warmer = new SerializerCacheWarmer([new YamlFileLoader(__DIR__.'/../Fixtures/Serialization/Resources/does_not_exist.yaml')], tempnam(sys_get_temp_dir(), __FUNCTION__));
@@ -95,10 +82,6 @@ public function testClassAutoloadExceptionWithUnrelatedException()
9582
$this->expectException(\DomainException::class);
9683
$this->expectExceptionMessage('This exception should not be caught by the warmer.');
9784

98-
if (!class_exists(CacheClassMetadataFactory::class) || !method_exists(XmlFileLoader::class, 'getMappedClasses') || !method_exists(YamlFileLoader::class, 'getMappedClasses')) {
99-
$this->markTestSkipped('The Serializer default cache warmer has been introduced in the Serializer Component version 3.2.');
100-
}
101-
10285
$this->assertFalse(class_exists($mappedClass = 'AClassThatDoesNotExist_FWB_CacheWarmer_SerializerCacheWarmerTest', false));
10386

10487
$warmer = new SerializerCacheWarmer([new YamlFileLoader(__DIR__.'/../Fixtures/Serialization/Resources/does_not_exist.yaml')], tempnam(sys_get_temp_dir(), __FUNCTION__));

0 commit comments

Comments
 (0)