Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use XMLBundle in container tests #1058

Merged
merged 1 commit into from Nov 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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