public function testGetFile() { /** * List if test process IDs. * We need to test cases when new ID and existed ID passed into tested method. */ $processIdList = array(1, 2, 2); foreach ($processIdList as $processId) { $this->_currentProcessId = $processId; $this->assertInstanceOf('Mage_Index_Model_Process_File', $this->_storage->getFile($processId)); } $this->assertAttributeCount(2, '_fileHandlers', $this->_storage); }
/** * Get process file instance * * @return Mage_Index_Model_Process_File */ protected function _getProcessFile() { if (!$this->_processFile) { $this->_processFile = $this->_lockStorage->getFile($this->getId()); } return $this->_processFile; }