Skip to content

Commit

Permalink
Merge pull request #1058 from alcaeus/fix-test-deprecation
Browse files Browse the repository at this point in the history
Use XMLBundle in container tests
  • Loading branch information
alcaeus committed Nov 19, 2019
2 parents f91e0c3 + 142f878 commit 2a72f76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Tests/ContainerTest.php
Expand Up @@ -37,7 +37,7 @@ protected function setUp()

public function testContainer()
{
$container = $this->createYamlBundleTestContainer();
$container = $this->createXmlBundleTestContainer();

$this->assertInstanceOf(DbalLogger::class, $container->get('doctrine.dbal.logger'));
$this->assertInstanceOf(DoctrineDataCollector::class, $container->get('data_collector.doctrine'));
Expand Down
12 changes: 6 additions & 6 deletions Tests/TestCase.php
Expand Up @@ -25,12 +25,12 @@ protected function setUp()
$this->markTestSkipped('Doctrine is not available.');
}

public function createYamlBundleTestContainer()
public function createXmlBundleTestContainer()
{
$container = new ContainerBuilder(new ParameterBag([
'kernel.name' => 'app',
'kernel.debug' => false,
'kernel.bundles' => ['YamlBundle' => 'Fixtures\Bundles\YamlBundle\YamlBundle'],
'kernel.bundles' => ['XmlBundle' => 'Fixtures\Bundles\XmlBundle\XmlBundle'],
'kernel.cache_dir' => sys_get_temp_dir(),
'kernel.environment' => 'test',
'kernel.root_dir' => __DIR__ . '/../../../../', // src dir
Expand Down Expand Up @@ -63,10 +63,10 @@ public function createYamlBundleTestContainer()
'entity_managers' => [
'default' => [
'mappings' => [
'YamlBundle' => [
'type' => 'yml',
'dir' => __DIR__ . '/DependencyInjection/Fixtures/Bundles/YamlBundle/Resources/config/doctrine',
'prefix' => 'Fixtures\Bundles\YamlBundle\Entity',
'XmlBundle' => [
'type' => 'xml',
'dir' => __DIR__ . '/DependencyInjection/Fixtures/Bundles/XmlBundle/Resources/config/doctrine',
'prefix' => 'Fixtures\Bundles\XmlBundle\Entity',
],
],
],
Expand Down

0 comments on commit 2a72f76

Please sign in to comment.