public function testGetUrlParts() { $questions = new Entity\Poll\Question(); $questions->setId(1); $questions->setPoll($this->_mockContainer->getPoll(2)); $expected = array('polls', 2, 'questions', 1); $this->assertEquals($expected, $questions->getUrlParts()); }
public function getUrlParts() { $questionParts = $this->question->getUrlParts(); $answerParts = array($this->_pluralizeForUrl($this->getEntityType()), $this->getId()); return array_merge($questionParts, $answerParts); }