Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed the tests

  • Loading branch information...
commit 7d3cf70c75cf7230c59984b228893ca31032cc78 1 parent 89c7e14
@stof stof authored
Showing with 16 additions and 7 deletions.
  1. +1 −0  ConnectionFactory.php
  2. +8 −0 Registry.php
  3. +7 −7 Tests/RegistryTest.php
View
1  ConnectionFactory.php
@@ -44,6 +44,7 @@ public function __construct(array $typesConfig)
* @param array $params
* @param Configuration $config
* @param EventManager $eventManager
+ * @param array $mappingTypes
*
* @return \Doctrine\DBAL\Connection
*/
View
8 Registry.php
@@ -103,6 +103,8 @@ public function getEntityManagers()
* @param string $name The entity manager name (null for the default one)
*
* @return EntityManager
+ *
+ * @deprecated
*/
public function resetEntityManager($name = null)
{
@@ -119,6 +121,8 @@ public function resetEntityManager($name = null)
* @param string $alias The alias
*
* @return string The full namespace
+ *
+ * @deprecated
*/
public function getEntityNamespace($alias)
{
@@ -154,6 +158,8 @@ public function getAliasNamespace($alias)
* Gets all connection names.
*
* @return array An array of connection names
+ *
+ * @deprecated
*/
public function getEntityManagerNames()
{
@@ -168,6 +174,8 @@ public function getEntityManagerNames()
* @param string $class A Doctrine Entity class name
*
* @return EntityManager|null
+ *
+ * @deprecated
*/
public function getEntityManagerForClass($class)
{
View
14 Tests/RegistryTest.php
@@ -31,7 +31,7 @@ public function testGetDefaultEntityManagerName()
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
$registry = new Registry($container, array(), array(), 'default', 'default');
- $this->assertEquals('default', $registry->getDefaultEntityManagerName());
+ $this->assertEquals('default', $registry->getDefaultManagerName());
}
public function testGetDefaultConnection()
@@ -90,7 +90,7 @@ public function testGetDefaultEntityManager()
$registry = new Registry($container, array(), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');
- $this->assertSame($em, $registry->getEntityManager());
+ $this->assertSame($em, $registry->getManager());
}
public function testGetEntityManager()
@@ -104,7 +104,7 @@ public function testGetEntityManager()
$registry = new Registry($container, array(), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');
- $this->assertSame($em, $registry->getEntityManager('default'));
+ $this->assertSame($em, $registry->getManager('default'));
}
public function testGetUnknownEntityManager()
@@ -113,7 +113,7 @@ public function testGetUnknownEntityManager()
$registry = new Registry($container, array(), array(), 'default', 'default');
$this->setExpectedException('InvalidArgumentException', 'Doctrine ORM Manager named "default" does not exist.');
- $registry->getEntityManager('default');
+ $registry->getManager('default');
}
public function testResetDefaultEntityManager()
@@ -124,7 +124,7 @@ public function testResetDefaultEntityManager()
->with($this->equalTo('doctrine.orm.default_entity_manager'), $this->equalTo(null));
$registry = new Registry($container, array(), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');
- $registry->resetEntityManager();
+ $registry->resetManager();
}
public function testResetEntityManager()
@@ -135,7 +135,7 @@ public function testResetEntityManager()
->with($this->equalTo('doctrine.orm.default_entity_manager'), $this->equalTo(null));
$registry = new Registry($container, array(), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');
- $registry->resetEntityManager('default');
+ $registry->resetManager('default');
}
public function testResetUnknownEntityManager()
@@ -144,6 +144,6 @@ public function testResetUnknownEntityManager()
$registry = new Registry($container, array(), array(), 'default', 'default');
$this->setExpectedException('InvalidArgumentException', 'Doctrine ORM Manager named "default" does not exist.');
- $registry->resetEntityManager('default');
+ $registry->resetManager('default');
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.