public function indexAction() { if (!$this->model->getFeatureDisabled()) { $state = $this->model->getProcessingState(); $this->view->state = array('consistencycheck' => $state); if ($state == 'scheduled' || $state == 'completed') { $data = $this->model->readLogFile(); if (!is_null($data)) { $this->view->content = array('consistencycheck' => $data->getContent()); $this->view->contentLastModTime = array('consistencycheck' => $data->getModifiedDate()); } } if (is_null($state)) { $this->view->error = array('consistencycheck' => true); } } }
public function testProcessingStateInProgress() { $this->enableAsyncMode(); $this->touchLogfile(true); $model = new Admin_Model_IndexMaintenance(); $state = $model->getProcessingState(); $this->assertEquals('inprogress', $state); }