public function testRead() { $this->rlpMapper->save($this->content1, '/products/news/content1-news', 'sulu_io', 'de'); $this->sessionManager->getSession()->save(); $result = $this->rlpMapper->loadByContent($this->content1, 'sulu_io', 'de'); $this->assertEquals('/products/news/content1-news', $result); }
public function testRead() { // its a delegate $result = $this->mapper->loadByContent($this->getNodeMock(), 'default', 'de'); $this->assertEquals('/test', $result); $result = $this->mapper->loadByContentUuid('123-123-123', 'default', 'de'); $this->assertEquals('/test', $result); }
/** * returns path for given contentNode. * * @param NodeInterface $contentNode reference node * @param string $webspaceKey key of portal * @param string $languageCode * @param string $segmentKey * * @return string path */ public function loadByContent(NodeInterface $contentNode, $webspaceKey, $languageCode, $segmentKey = null) { // delegate to mapper return $this->mapper->loadByContent($contentNode, $webspaceKey, $languageCode, $segmentKey); }