-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match route #9
Match route #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work 💡👏
$_SERVER['REQUEST_URI'] = 'https://example.org/expected/uri'; | ||
$_SERVER['REQUEST_METHOD'] = $testMethod; | ||
|
||
$this->expectOutputString(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we throw an exception with a 404 error code
? @Tito-Kati @Chemaclass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah! We currently don't have support for 404, so this is a nice follow up feature to implement ;)
$_SERVER['REQUEST_URI'] = 'https://example.org/expected/uri'; | ||
$_SERVER['REQUEST_METHOD'] = 'GET'; | ||
|
||
$this->expectOutputString(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here?
📚 Description
Add the match() method to the Router that allows subscribing a route to multiple HTTP methods simultaneously.
🔖 Changes