/** * Test get instance. * * @return null */ public function testGetInstance() { $oSetupCore = new Core(); $this->assertTrue($oSetupCore->getInstance("Core") instanceof Core); }
/** * Testing Setup::getModuleClass() * * @return null */ public function testGetModuleClass() { $core = new Core(); /** @var Setup $oSetup */ $oSetup = $core->getInstance('Setup'); $this->assertEquals('pass', $oSetup->getModuleClass(2)); $this->assertEquals('pmin', $oSetup->getModuleClass(1)); $this->assertEquals('null', $oSetup->getModuleClass(-1)); $this->assertEquals('fail', $oSetup->getModuleClass(0)); }
/** * @return Controller */ protected function getController() { $core = new Core(); return $core->getInstance('Controller'); }