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')); }