[DoctrineBundle] Shortened Dependency Injection Fixture namespace to avoid Windows filepath length error.
This commit is contained in:
parent
6d6c9a5c9d
commit
c4a2fb41ec
@ -18,7 +18,7 @@ class InfoDoctrineCommandTest extends TestCase
|
||||
->with($this->equalTo("Found 1 entities mapped in entity manager 'default':"), $this->equalTo(true));
|
||||
$output->expects($this->at(1))
|
||||
->method('write')
|
||||
->with($this->equalTo("<info>[OK]</info> DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle\Entity\Test"), $this->equalTo(true));
|
||||
->with($this->equalTo("<info>[OK]</info> Fixtures\Bundles\YamlBundle\Entity\Test"), $this->equalTo(true));
|
||||
|
||||
$testContainer = $this->createYamlBundleTestContainer();
|
||||
$kernel = $this->getMock('Symfony\Component\HttpKernel\Kernel', array(), array(), '', false);
|
||||
|
@ -170,7 +170,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
|
||||
$definition = $container->getDefinition('doctrine.orm.default_configuration');
|
||||
$calls = array_values($definition->getMethodCalls());
|
||||
$this->assertEquals(array('YamlBundle' => 'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle\Entity'), $calls[0][1][0]);
|
||||
$this->assertEquals(array('YamlBundle' => 'Fixtures\Bundles\YamlBundle\Entity'), $calls[0][1][0]);
|
||||
$this->assertEquals('doctrine.orm.default_metadata_cache', (string) $calls[1][1][0]);
|
||||
$this->assertEquals('doctrine.orm.default_query_cache', (string) $calls[2][1][0]);
|
||||
$this->assertEquals('doctrine.orm.default_result_cache', (string) $calls[3][1][0]);
|
||||
@ -363,7 +363,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
|
||||
$definition = $container->getDefinition('doctrine.orm.default_configuration');
|
||||
$this->assertDICDefinitionMethodCallOnce($definition, 'setEntityNamespaces',
|
||||
array(array('YamlBundle' => 'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle\Entity'))
|
||||
array(array('YamlBundle' => 'Fixtures\Bundles\YamlBundle\Entity'))
|
||||
);
|
||||
}
|
||||
|
||||
@ -377,7 +377,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
|
||||
$definition = $container->getDefinition('doctrine.orm.default_configuration');
|
||||
$this->assertDICDefinitionMethodCallOnce($definition, 'setEntityNamespaces',
|
||||
array(array('yml' => 'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle\Entity'))
|
||||
array(array('yml' => 'Fixtures\Bundles\YamlBundle\Entity'))
|
||||
);
|
||||
}
|
||||
|
||||
@ -392,7 +392,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
$definition = $container->getDefinition('doctrine.orm.default_metadata_driver');
|
||||
$this->assertDICDefinitionMethodCallOnce($definition, 'addDriver', array(
|
||||
new Reference('doctrine.orm.default_yml_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle\Entity'
|
||||
'Fixtures\Bundles\YamlBundle\Entity'
|
||||
));
|
||||
}
|
||||
|
||||
@ -407,7 +407,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
$definition = $container->getDefinition('doctrine.orm.default_metadata_driver');
|
||||
$this->assertDICDefinitionMethodCallOnce($definition, 'addDriver', array(
|
||||
new Reference('doctrine.orm.default_xml_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle\Entity'
|
||||
'Fixtures\Bundles\XmlBundle\Entity'
|
||||
));
|
||||
}
|
||||
|
||||
@ -422,7 +422,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
$definition = $container->getDefinition('doctrine.orm.default_metadata_driver');
|
||||
$this->assertDICDefinitionMethodCallOnce($definition, 'addDriver', array(
|
||||
new Reference('doctrine.orm.default_annotation_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\AnnotationsBundle\Entity'
|
||||
'Fixtures\Bundles\AnnotationsBundle\Entity'
|
||||
));
|
||||
}
|
||||
|
||||
@ -444,11 +444,11 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
$definition = $container->getDefinition('doctrine.orm.default_metadata_driver');
|
||||
$this->assertDICDefinitionMethodCallAt(0, $definition, 'addDriver', array(
|
||||
new Reference('doctrine.orm.default_annotation_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\AnnotationsBundle\Entity'
|
||||
'Fixtures\Bundles\AnnotationsBundle\Entity'
|
||||
));
|
||||
$this->assertDICDefinitionMethodCallAt(1, $definition, 'addDriver', array(
|
||||
new Reference('doctrine.orm.default_xml_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle\Entity'
|
||||
'Fixtures\Bundles\XmlBundle\Entity'
|
||||
));
|
||||
|
||||
$configDef = $container->getDefinition('doctrine.orm.default_configuration');
|
||||
@ -534,17 +534,17 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
|
||||
$this->assertDICDefinitionMethodCallAt(0, $definition, 'addDriver', array(
|
||||
new Reference('doctrine.orm.default_annotation_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\AnnotationsBundle\Entity'
|
||||
'Fixtures\Bundles\AnnotationsBundle\Entity'
|
||||
));
|
||||
|
||||
$this->assertDICDefinitionMethodCallAt(1, $definition, 'addDriver', array(
|
||||
new Reference('doctrine.orm.default_yml_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle\Entity'
|
||||
'Fixtures\Bundles\YamlBundle\Entity'
|
||||
));
|
||||
|
||||
$this->assertDICDefinitionMethodCallAt(2, $definition, 'addDriver', array(
|
||||
new Reference('doctrine.orm.default_xml_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle'
|
||||
'Fixtures\Bundles\XmlBundle'
|
||||
));
|
||||
|
||||
$annDef = $container->getDefinition('doctrine.orm.default_annotation_metadata_driver');
|
||||
@ -583,17 +583,17 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
|
||||
$this->assertDICDefinitionMethodCallAt(0, $def1, 'addDriver', array(
|
||||
new Reference('doctrine.orm.em1_annotation_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\AnnotationsBundle\Entity'
|
||||
'Fixtures\Bundles\AnnotationsBundle\Entity'
|
||||
));
|
||||
|
||||
$this->assertDICDefinitionMethodCallAt(0, $def2, 'addDriver', array(
|
||||
new Reference('doctrine.orm.em2_yml_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle\Entity'
|
||||
'Fixtures\Bundles\YamlBundle\Entity'
|
||||
));
|
||||
|
||||
$this->assertDICDefinitionMethodCallAt(1, $def2, 'addDriver', array(
|
||||
new Reference('doctrine.orm.em2_xml_metadata_driver'),
|
||||
'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle'
|
||||
'Fixtures\Bundles\XmlBundle'
|
||||
));
|
||||
|
||||
$annDef = $container->getDefinition('doctrine.orm.em1_annotation_metadata_driver');
|
||||
@ -623,7 +623,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
|
||||
$calls = $container->getDefinition('doctrine.orm.default_metadata_driver')->getMethodCalls();
|
||||
$this->assertEquals('doctrine.orm.default_annotation_metadata_driver', (string) $calls[0][1][0]);
|
||||
$this->assertEquals('DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\Vendor\AnnotationsBundle\Entity', $calls[0][1][1]);
|
||||
$this->assertEquals('Fixtures\Bundles\Vendor\AnnotationsBundle\Entity', $calls[0][1][1]);
|
||||
}
|
||||
|
||||
public function testSetTypes()
|
||||
@ -653,7 +653,7 @@ abstract class AbstractDoctrineExtensionTest extends TestCase
|
||||
foreach ($bundles as $bundle) {
|
||||
require_once __DIR__.'/Fixtures/Bundles/'.($vendor ? $vendor.'/' : '').$bundle.'/'.$bundle.'.php';
|
||||
|
||||
$map[$bundle] = 'DoctrineBundle\\Tests\DependencyInjection\\Fixtures\\Bundles\\'.($vendor ? $vendor.'\\' : '').$bundle.'\\'.$bundle;
|
||||
$map[$bundle] = 'Fixtures\\Bundles\\'.($vendor ? $vendor.'\\' : '').$bundle.'\\'.$bundle;
|
||||
}
|
||||
|
||||
return new ContainerBuilder(new ParameterBag(array(
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\AnnotationsBundle;
|
||||
namespace Fixtures\Bundles\AnnotationsBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\AnnotationsBundle\Entity;
|
||||
namespace Fixtures\Bundles\AnnotationsBundle\Entity;
|
||||
|
||||
class Test
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\Vendor\AnnotationsBundle;
|
||||
namespace Fixtures\Bundles\Vendor\AnnotationsBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\Vendor\AnnotationsBundle\Entity;
|
||||
namespace Fixtures\Bundles\Vendor\AnnotationsBundle\Entity;
|
||||
|
||||
class Test
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle\Entity;
|
||||
namespace Fixtures\Bundles\XmlBundle\Entity;
|
||||
|
||||
class Test
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle;
|
||||
namespace Fixtures\Bundles\XmlBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle\Entity;
|
||||
namespace Fixtures\Bundles\YamlBundle\Entity;
|
||||
|
||||
class Test
|
||||
{
|
||||
|
@ -1,5 +0,0 @@
|
||||
DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle\Entity\Test:
|
||||
type: entity
|
||||
id:
|
||||
id:
|
||||
type: integer
|
@ -0,0 +1,5 @@
|
||||
Fixtures\Bundles\YamlBundle\Entity\Test:
|
||||
type: entity
|
||||
id:
|
||||
id:
|
||||
type: integer
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle;
|
||||
namespace Fixtures\Bundles\YamlBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<doctrine:entity-manager name="em2">
|
||||
<mappings>
|
||||
<mapping name="YamlBundle" dir="Resources/config/doctrine/metadata" alias="yml" />
|
||||
<mapping name="manual" type="xml" prefix="DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle"
|
||||
<mapping name="manual" type="xml" prefix="Fixtures\Bundles\XmlBundle"
|
||||
dir="%kernel.root_dir%/../src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/Resources/config/doctrine/metadata"
|
||||
alias="TestAlias"
|
||||
/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
<mappings>
|
||||
<mapping name="AnnotationsBundle" />
|
||||
<mapping name="YamlBundle" dir="Resources/config/doctrine/metadata" alias="yml" />
|
||||
<mapping name="manual" type="xml" prefix="DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle"
|
||||
<mapping name="manual" type="xml" prefix="Fixtures\Bundles\XmlBundle"
|
||||
dir="%kernel.root_dir%/../src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/Resources/config/doctrine/metadata"
|
||||
alias="TestAlias"
|
||||
/>
|
||||
|
@ -10,6 +10,6 @@ doctrine.orm:
|
||||
alias: yml
|
||||
manual:
|
||||
type: xml
|
||||
prefix: DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle
|
||||
prefix: Fixtures\Bundles\XmlBundle
|
||||
dir: %kernel.root_dir%/../src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/Resources/config/doctrine/metadata
|
||||
alias: TestAlias
|
@ -6,6 +6,6 @@ doctrine.orm:
|
||||
alias: yml
|
||||
manual:
|
||||
type: xml
|
||||
prefix: DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\XmlBundle
|
||||
prefix: Fixtures\Bundles\XmlBundle
|
||||
dir: %kernel.root_dir%/../src/Symfony/Bundle/DoctrineBundle/Tests/DependencyInjection/Fixtures/Bundles/XmlBundle/Resources/config/doctrine/metadata
|
||||
alias: TestAlias
|
@ -50,7 +50,7 @@ class TestCase extends \PHPUnit_Framework_TestCase
|
||||
public function createYamlBundleTestContainer()
|
||||
{
|
||||
$container = new ContainerBuilder(new ParameterBag(array(
|
||||
'kernel.bundles' => array('YamlBundle' => 'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle\YamlBundle'),
|
||||
'kernel.bundles' => array('YamlBundle' => 'Fixtures\Bundles\YamlBundle\YamlBundle'),
|
||||
'kernel.cache_dir' => sys_get_temp_dir(),
|
||||
'kernel.root_dir' => __DIR__ . "/../../../../" // src dir
|
||||
)));
|
||||
@ -73,7 +73,7 @@ class TestCase extends \PHPUnit_Framework_TestCase
|
||||
'mappings' => array('YamlBundle' => array(
|
||||
'type' => 'yml',
|
||||
'dir' => __DIR__ . "/DependencyInjection/Fixtures/Bundles/YamlBundle/Resources/config/doctrine/metadata/orm",
|
||||
'prefix' => 'DoctrineBundle\Tests\DependencyInjection\Fixtures\Bundles\YamlBundle',
|
||||
'prefix' => 'Fixtures\Bundles\YamlBundle',
|
||||
)))), $container);
|
||||
|
||||
$container->setDefinition('my.platform', new \Symfony\Component\DependencyInjection\Definition('Doctrine\DBAL\Platforms\MySqlPlatform'));
|
||||
|
Reference in New Issue
Block a user