/** * @return \Nano\Helper * @param string $name * * @throws \Nano\Exception\HelperNotFound */ protected function search($name) { $className = \Nano\Names::helperClass($name, $this->module); $classPath = \Nano\Names::moduleFile($className); if (!$this->application->loader->loadFileWithClass($className, $classPath)) { throw new \Nano\Exception\HelperNotFound($name, $this->module); } return new $className(); }
public function testShouldThrowExceptionWhenModuleNotFound() { $this->setExpectedException('\\Nano\\Application\\Exception\\ModuleNotFound', 'Module \'test\' not found'); \Nano\Names::moduleFile('\\Module\\Test\\Plugin\\Foo'); }