/** * Add Module * @param string $moduleName * @param array $args */ public function addModule($moduleName, $args = []) { try { $module = $this->moduleFactory->build($moduleName, PHP_OS, $args); $this->moduleComposite->addComponent($module); } catch (ModuleException $e) { $this->logger->addWarning($e->getMessage()); } }
/** * @expectedException Api\Exception\Api */ public function testBuildingNonExistentModule() { $moduleFactory = new Factory(); $moduleFactory->build('someNonExistentModule', 'Linux'); }