Ejemplo n.º 1
0
 /**
  * Adds a route that can be used in the functional tests
  *
  * @param $uriPattern
  * @param array $defaults
  */
 protected function registerRoute($uriPattern, array $defaults)
 {
     $route = new Route();
     $route->setUriPattern($uriPattern);
     $route->setDefaults($defaults);
     $route->setAppendExceedingArguments(TRUE);
     $this->router->addRoute($route);
 }
Ejemplo n.º 2
0
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $route = new Route();
     $route->setName('Functional Test - Http::Client::InternalRequestEngine');
     $route->setUriPattern('test/security/restricted');
     $route->setDefaults(array('@package' => 'TYPO3.FLOW3', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'Restricted', '@action' => 'admin', '@format' => 'html'));
     $this->router->addRoute($route);
 }
Ejemplo n.º 3
0
 /**
  * @test
  */
 public function parseSetsDefaultValueOfRoutePartsRecursively()
 {
     $this->route->setUriPattern('{foo.bar}');
     $this->route->setRoutePartsConfiguration(array('foo.bar' => array('handler' => 'SomeRoutePartHandler')));
     $this->route->setDefaults(array('foo' => array('bar' => 'SomeDefaultValue')));
     $mockRoutePartHandler = $this->getMock('TYPO3\\FLOW3\\Mvc\\Routing\\DynamicRoutePartInterface');
     $mockRoutePartHandler->expects($this->once())->method('setDefaultValue')->with('SomeDefaultValue');
     $this->mockObjectManager->expects($this->once())->method('get')->with('SomeRoutePartHandler')->will($this->returnValue($mockRoutePartHandler));
     $this->route->parse();
 }
Ejemplo n.º 4
0
 /**
  * Adds a route that can be used in the functional tests
  *
  * @param string $name
  * @param string $uriPattern
  * @param array $defaults
  * @param boolean $appendExceedingArguments
  * @return void
  */
 protected function registerRoute($name, $uriPattern, array $defaults, $appendExceedingArguments = FALSE)
 {
     $route = new Route();
     $route->setName($name);
     $route->setUriPattern($uriPattern);
     $route->setDefaults($defaults);
     $route->setAppendExceedingArguments($appendExceedingArguments);
     $this->router->addRoute($route);
 }
Ejemplo n.º 5
0
 /**
  * Additional setup: Routes
  */
 public function setUp()
 {
     parent::setUp();
     $route = new Route();
     $route->setName('AbstractControllerTest Route 1');
     $route->setUriPattern('test/mvc/abstractcontrollertesta/{@action}');
     $route->setDefaults(array('@package' => 'TYPO3.FLOW3', '@subpackage' => 'Tests\\Functional\\Mvc\\Fixtures', '@controller' => 'AbstractControllerTestA', '@format' => 'html'));
     $route->setAppendExceedingArguments(TRUE);
     $this->router->addRoute($route);
 }
Ejemplo n.º 6
0
 /**
  * @return void
  */
 public function setUp()
 {
     parent::setUp();
     $route = new Route();
     $route->setName('Functional Test - Security::Authentication');
     $route->setUriPattern('test/security/restricted(/{@action})');
     $route->setDefaults(array('@package' => 'TYPO3.FLOW3', '@subpackage' => 'Tests\\Functional\\Security\\Fixtures', '@controller' => 'Restricted', '@action' => 'public', '@format' => 'html'));
     $route->setAppendExceedingArguments(TRUE);
     $this->router->addRoute($route);
 }