Example #1
0
 public function testGetRoute()
 {
     $this->requestMock->expects($this->any())->method('getUri')->will($this->returnValue(null));
     $options = array('lang' => 'en', 'controller' => 'index', 'action' => 'index');
     $defaultRoute = new Vmvc_Route('/^[a-z]{2}$:lang/:controller/:action/', $options);
     $this->object->addRoute($defaultRoute);
     $this->object->setDefaultRoute($defaultRoute, '/en/index/index/');
     $route = $this->object->getRoute();
     $this->assertSame($defaultRoute, $route);
 }
 /**
  * @return string
  */
 public function getAction()
 {
     if ($this->action === null) {
         return $this->router->getRouteVar('action');
     }
     return $this->action;
 }