/** * Parse one type * * @param array $options * @return void */ protected function _parseByTypeOptions($options) { foreach ($this->_getFiles($options) as $file) { $adapter = $this->_adapters[$options['type']]; $adapter->parse($file); list($contextType, $contextValue) = $this->_context->getContextByPath($file); foreach ($adapter->getPhrases() as $phraseData) { $this->_addPhrase($phraseData, $contextType, $contextValue); } } }
/** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Invalid path given: "invalid_path". */ public function testGetContextByPathWithInvalidPath() { $this->context->getContextByPath('invalid_path'); }