Пример #1
0
 /**
  * @covers Application\Controller\MapController::getEntityManager
  */
 public function testGetEntityManager()
 {
     $mock = $this->getMock('\\Zend\\ServiceManager\\ServiceManager');
     $mock->expects($this->any())->method('get')->will($this->returnValue('EntityManager'));
     $this->object->setServiceLocator($mock);
     $this->assertEquals('EntityManager', $this->object->getEntityManager());
     $value = 'entityManager';
     //$this->assertNull($this->object->getEntityManager());
     $this->object->setEntityManager($value);
     $this->assertSame($value, $this->object->getEntityManager());
 }