예제 #1
0
 public function setUp()
 {
     $this->initDatabaseAdapter();
     $this->sm = Bootstrap::getServiceManager();
     $this->sm->setAllowOverride(true);
     $this->sm->setService('Trade\\Entity\\Research', new \Trade\Entity\Research());
     $this->sm->setService('Zend\\Db\\Adapter\\Adapter', $this->dbAdapter);
 }
예제 #2
0
 public function setUp()
 {
     $this->sm = Bootstrap::getServiceManager();
     $this->sm->setAllowOverride(true);
     $servicesToMock = array('Zend\\Db\\Adapter\\Adapter' => 'Zend\\Db\\Adapter\\Adapter', 'Core\\Service\\Tick' => 'Core\\Service\\Tick', 'logger' => 'Zend\\Log\\Logger', 'Trade\\Table\\ResearchTable' => 'Trade\\Table\\ResearchTable', 'Trade\\Table\\ResearchView' => 'Trade\\Table\\ResearchView', 'Trade\\Table\\ResourceTable' => 'Trade\\Table\\ResourceTable', 'Trade\\Table\\ResourceView' => 'Trade\\Table\\ResourceView', 'Colony\\Table\\ColonyTable' => 'Colony\\Table\\ColonyTable', 'Galaxy\\Table\\SystemTable' => 'Galaxy\\Table\\SystemTable', 'Galaxy\\Table\\SystemObjectTable' => 'Galaxy\\Table\\SystemObjectTable', 'Fleet\\Table\\FleetTable' => 'Fleet\\Table\\FleetTable', 'Techtree\\Table\\ColonyBuildingTable' => 'Techtree\\Table\\ColonyBuildingTable', 'Resources\\Table\\ColonyTable' => 'Resources\\Table\\ColonyTable', 'Resources\\Table\\ResourceTable' => 'Resources\\Table\\ResourceTable', 'Resources\\Table\\UserTable' => 'Resources\\Table\\UserTable');
     foreach ($servicesToMock as $key => $serviceName) {
         $this->sm->setService($key, $this->getMockBuilder($serviceName)->disableOriginalConstructor()->getMock());
     }
 }
예제 #3
0
 public function setUp()
 {
     $this->sm = Bootstrap::getServiceManager();
     #$this->sm->setAllowOverride(true);
 }