Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Use the standard route parser from FastRoute #32

Merged
merged 13 commits into from
Aug 11, 2017
3 changes: 2 additions & 1 deletion src/FastRouteRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ public function generateUri($name, array $substitutions = [], array $options = [

// No valid route was found: list minimal required parameters
throw new Exception\InvalidArgumentException(sprintf(
'Expected parameter values for at least [%s], but received [%s]',
'Route `%s` expects al least parameter values for [%s], but received [%s]',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

al -> at (typo)

$name,
implode(',', $missingParameters),
implode(',', array_keys($substitutions))
));
Expand Down
2 changes: 1 addition & 1 deletion test/FastRouteRouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ public function testGenerateUriRaisesExceptionForMissingMandatoryParameters()
$router->addRoute($route);

$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Expected parameter values for at least [id], but received []');
$this->expectExceptionMessage('expects al least parameter values for');

$router->generateUri('foo');
}
Expand Down
2 changes: 1 addition & 1 deletion test/UriGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function provideRouteTests()
'/test/{param}',
['id' => 'foo'],
InvalidArgumentException::class,
'Expected parameter values for at least [param], but received [id]',
'expects al least parameter values for',
],

['/te{ param }st', ['param' => 'foo'], '/tefoost', null],
Expand Down