public function testIsProcessLockedFalseWithoutUnlock() { $this->_openFile(); $this->assertFalse($this->_model->isProcessLocked()); $this->assertFalse($this->_tryGetSharedLock(), 'File must be locked'); $this->assertAttributeSame(true, '_streamLocked', $this->_model); $this->_model->processUnlock(); }
/** * @param array $eventData * @param bool $needLock * * @dataProvider safeProcessEventDataProvider */ public function testSafeProcessEvent(array $eventData, $needLock = false) { if ($needLock) { $this->_processFile->processLock(); } $event = $this->_objectManager->create('Mage_Index_Model_Event', array('data' => $eventData)); $this->assertEquals($this->_model, $this->_model->safeProcessEvent($event)); if ($needLock) { $this->_processFile->processUnlock(); } $this->assertFalse($this->_processFile->isProcessLocked(true)); }