public function matchesThrowsExceptionIfRoutePartValueContainsObjects($shouldThrowException, $routePartValue)
{
if ($shouldThrowException === true) {
$this->setExpectedException(InvalidRoutePartValueException::class);
}
$mockRoutePart = $this->createMock(Routing\RoutePartInterface::class);
$mockRoutePart->expects($this->once())->method('match')->with('foo')->will($this->returnValue(true));
$mockRoutePart->expects($this->any())->method('getName')->will($this->returnValue('TestRoutePart'));
$mockRoutePart->expects($this->once())->method('getValue')->will($this->returnValue($routePartValue));
$this->route->setUriPattern('foo');
$this->route->_set('routeParts', [$mockRoutePart]);
$this->route->_set('isParsed', true);
$this->routeMatchesPath('foo');
}