public function testFinish() { $cacheTypeListArray = array('one', 'two'); $this->_cache->expects($this->once())->method('clean'); $this->_config->expects($this->once())->method('reinit'); $this->_cacheState->expects($this->once())->method('persist'); $this->_cacheState->expects($this->exactly(count($cacheTypeListArray)))->method('setEnabled'); $this->_cacheTypeList->expects($this->once())->method('getTypes')->will($this->returnValue($cacheTypeListArray)); $this->_appState->expects($this->once())->method('setInstallDate')->with($this->greaterThanOrEqual(date('r'))); $this->_installerConfig->expects($this->once())->method('replaceTmpInstallDate')->with($this->greaterThanOrEqual(date('r'))); $this->assertSame($this->_model, $this->_model->finish()); }