Skip to content

Commit b69f05e

Browse files
committed
Skip XML test when the Symfony version doesn't support XML
1 parent 02a62bc commit b69f05e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/Functional/BundleConfigurationTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
1010
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
1111
use Symfony\Component\DependencyInjection\ContainerBuilder;
12+
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
1213
use Symfony\Component\HttpKernel\KernelInterface;
1314

1415
/**
@@ -37,7 +38,6 @@ public function provideBundleWithDifferentConfigurationFormats(): array
3738
{
3839
return [
3940
[__DIR__.'/../Fixtures/Resources/ConfigurationBundle/config.yml'],
40-
[__DIR__.'/../Fixtures/Resources/ConfigurationBundle/config.xml'],
4141
[__DIR__.'/../Fixtures/Resources/ConfigurationBundle/config.php'],
4242
[function (ContainerBuilder $container) {
4343
$container->loadFromExtension('configuration', [
@@ -46,6 +46,12 @@ public function provideBundleWithDifferentConfigurationFormats(): array
4646
]);
4747
}],
4848
];
49+
50+
if (class_exists(XmlFileLoader::class)) {
51+
$formats[] = [__DIR__.'/../Fixtures/Resources/ConfigurationBundle/config.xml'];
52+
}
53+
54+
return $formats;
4955
}
5056

5157
/**

0 commit comments

Comments
 (0)