/** * test restore without config entity * * @expectedException \Xpressengine\Document\Exceptions\ConfigNotExistsException * @return void */ public function testRestoreWithoutConfig() { $conn = $this->conn; $repo = $this->repo; $configHandler = $this->configHandler; $instanceManager = $this->instanceManager; $request = $this->request; $handler = new DocumentHandler($conn, $repo, $configHandler, $instanceManager, $request); $doc = $this->getDocumentEntity(); $doc->shouldReceive('restore'); $configHandler->shouldReceive('get')->andReturn(null); $handler->restore($doc); }
/** * 문서 복원 * * @param ItemEntity $item board item entity * @return int 삭제된 문서 수 */ public function restore(ItemEntity $item) { return $this->document->restore($item->getDocument()); }