FactoryGirl\Provider\Doctrine\FixtureFactory::setEntityNamespace PHP Method

setEntityNamespace() public method

Sets the namespace to be prefixed to all entity names passed to this class.
public setEntityNamespace ( $namespace )
    public function setEntityNamespace($namespace)
    {
        $this->entityNamespace = trim($namespace, '\\');
    }

Usage Example

Example #1
0
 public function setUp()
 {
     parent::setUp();
     $here = dirname(__FILE__);
     $this->testDb = new TestDb($here . '/TestEntity', $here . '/TestProxy', 'FactoryGirl\\Tests\\Provider\\Doctrine\\Fixtures\\TestProxy');
     $this->em = $this->testDb->createEntityManager();
     $this->factory = new FixtureFactory($this->em);
     $this->factory->setEntityNamespace('FactoryGirl\\Tests\\Provider\\Doctrine\\Fixtures\\TestEntity');
 }