/** * @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\Flow\Mvc\Routing\DynamicRoutePartInterface::class); $mockRoutePartHandler->expects($this->once())->method('setDefaultValue')->with('SomeDefaultValue'); $this->mockObjectManager->expects($this->once())->method('get')->with('SomeRoutePartHandler')->will($this->returnValue($mockRoutePartHandler)); $this->route->parse(); }