/** * @covers ::isValid * @covers ::_processPath */ public function test_isValid_should_return_true_for_valid_param_path() { $paramPath = 'configuration/whatever/whatever2/'; $path = new Path($paramPath, 'whatever', 'whatever'); $this->assertTrue($path->isValid()); }
/** * Inits processor and run preprocessor tasks if any * * @return void */ protected function _initProcessor() { $this->_processor = Processor::getInstance(); $paramPath = $this->_input->getArgument('path'); // If path cannot be loaded, exit immediately if (!$paramPath) { return; } $path = new Path($paramPath, getcwd(), $this->_baseDirectory); if ($path->isValid()) { $this->_processor->setPath($path); if (!$this->_input->getOption('ignore-manifest')) { $this->_manifest->load($path); // Check if we've some preprocessor task to complete $this->_runProcessors(Processor::PRE_PROCESSORS); } } }