public function matchesRecursivelyMergesMatchResults()
{
$mockRoutePart1 = $this->createMock(Routing\RoutePartInterface::class);
$mockRoutePart1->expects($this->once())->method('match')->will($this->returnValue(true));
$mockRoutePart1->expects($this->atLeastOnce())->method('getName')->will($this->returnValue('firstLevel.secondLevel.routePart1'));
$mockRoutePart1->expects($this->once())->method('getValue')->will($this->returnValue('foo'));
$mockRoutePart2 = $this->createMock(Routing\RoutePartInterface::class);
$mockRoutePart2->expects($this->once())->method('match')->will($this->returnValue(true));
$mockRoutePart2->expects($this->atLeastOnce())->method('getName')->will($this->returnValue('someOtherRoutePart'));
$mockRoutePart2->expects($this->once())->method('getValue')->will($this->returnValue('bar'));
$mockRoutePart3 = $this->createMock(Routing\RoutePartInterface::class);
$mockRoutePart3->expects($this->once())->method('match')->will($this->returnValue(true));
$mockRoutePart3->expects($this->atLeastOnce())->method('getName')->will($this->returnValue('firstLevel.secondLevel.routePart2'));
$mockRoutePart3->expects($this->once())->method('getValue')->will($this->returnValue('baz'));
$this->route->setUriPattern('');
$this->route->_set('routeParts', [$mockRoutePart1, $mockRoutePart2, $mockRoutePart3]);
$this->route->_set('isParsed', true);
$this->routeMatchesPath('');
$expectedResult = ['firstLevel' => ['secondLevel' => ['routePart1' => 'foo', 'routePart2' => 'baz']], 'someOtherRoutePart' => 'bar'];
$actualResult = $this->route->getMatchResults();
$this->assertEquals($expectedResult, $actualResult);
}