Exemple #1
0
 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());
 }
Exemple #2
0
 public function getUrlParts()
 {
     $questionParts = $this->question->getUrlParts();
     $answerParts = array($this->_pluralizeForUrl($this->getEntityType()), $this->getId());
     return array_merge($questionParts, $answerParts);
 }