public function testSetRoutePathWhenRouteParamsExists() { $this->assertNull($this->_model->getControllerName()); $this->assertNull($this->_model->getActionName()); $this->_model->setRoutePath('m/c/a/p1/v1/p2/v2'); $this->assertNotNull($this->_model->getControllerName()); $this->assertNotNull($this->_model->getActionName()); $this->assertNotEmpty($this->_model->getRouteParams()); $this->assertArrayHasKey('p1', $this->_model->getRouteParams()); $this->assertArrayHasKey('p2', $this->_model->getRouteParams()); $this->assertEquals('v1', $this->_model->getRouteParam('p1')); $this->assertEquals('v2', $this->_model->getRouteParam('p2')); }
public function testSetGetActionName() { $this->_model->setActionName('view'); $this->assertEquals('view', $this->_model->getActionName()); $this->markTestIncomplete('setActionName() logic is unclear.'); }
/** * Translates the action part before delivered to frontend * * @return false|mixed|null|string */ public function getActionName() { if (!$this->translationEnabled()) { return parent::getActionName(); } return $this->getTranslationModel()->translateActionToFront(parent::getActionName()); }