public function test_get_alias_namespace() { $this->container->shouldReceive('singleton'); $this->registry->addManager('default'); $em = m::mock(EntityManagerInterface::class); $configuration = m::mock(Configuration::class); $this->container->shouldReceive('make')->with('doctrine.managers.default')->andReturn($em); $em->shouldReceive('getConfiguration')->andReturn($configuration); $configuration->shouldReceive('getEntityNamespace')->with('Alias')->once()->andReturn('Namespace'); $this->assertEquals('Namespace', $this->registry->getAliasNamespace('Alias')); }
/** * Resolves a registered namespace alias to the full namespace. * * This method looks for the alias in all registered object managers. * * @param string $alias The alias. * @throws ORMException * @return string The full namespace. * @static */ public static function getAliasNamespace($alias) { return \LaravelDoctrine\ORM\IlluminateRegistry::getAliasNamespace($alias); }