FactoryGirl\Tests\Provider\Doctrine\Fixtures\SingletonTest::allowsSettingSingletons PHP Method

allowsSettingSingletons() public method

    public function allowsSettingSingletons()
    {
        $this->factory->defineEntity('SpaceShip');
        $ss = new TestEntity\SpaceShip("The mothership");
        $this->factory->setSingleton('SpaceShip', $ss);
        $this->assertSame($ss, $this->factory->get('SpaceShip'));
    }