Exemplo n.º 1
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();
 }