示例#1
0
 public function testHas()
 {
     $manager = new FactoryManager();
     $this->assertFalse($manager->has('foo'), '->has() returns FALSE when there is no defined factory');
     $manager->set('foo', $this->getFactoryMock());
     $this->assertTrue($manager->has('foo'), '->has() returns TRUE when the specified factory is defined');
     $this->assertFalse($manager->has('bar'), '->has() returns FALSE when the specified factory is NOT defined');
 }