/** * get revision document entity * * @param string $revisionId revision id * @return DocumentEntity */ public function getRevision($revisionId) { return $this->document->getRevision($revisionId, $this->configHandler->getDynamicFields($this->config->get('boardId'))); }
/** * test get revision * * @return void */ public function testGetRevision() { $conn = $this->conn; $repo = $this->repo; $configHandler = $this->configHandler; $instanceManager = $this->instanceManager; $request = $this->request; $handler = new DocumentHandler($conn, $repo, $configHandler, $instanceManager, $request); $repo->shouldReceive('fetchRevision')->andReturn(['id' => 'documentId']); $result = $handler->getRevision('revisionId'); $this->assertInstanceOf('Xpressengine\\Document\\DocumentEntity', $result); }