8000 Improve error reporting in router panel of web profiler by javiereguiluz · Pull Request #17744 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Improve error reporting in router panel of web profiler #17744

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

Closed
wants to merge 9 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixed tests
  • Loading branch information
javiereguiluz committed Mar 3, 2016
commit e5bb235da6de48d54bb282703683350d42d6efd1
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ public function testRoutesWithConditions()
$matcher = new TraceableUrlMatcher($routes, $context);

$notMatchingRequest = Request::create('/foo', 'GET');
$traces = $matcher->getTracesFromRequest($notMatchingRequest);
$traces = $matcher->getTracesForRequest($notMatchingRequest);
$this->assertEquals("Condition \"request.headers.get('User-Agent') matches '/firefox/i'\" does not evaluate to \"true\"", $traces[0]['log']);

$matchingRequest = Request::create('/foo', 'GET', array(), array(), array(), array('HTTP_USER_AGENT' => 'Firefox'));
$traces = $matcher->getTracesFromRequest($matchingRequest);
$traces = $matcher->getTracesForRequest($matchingRequest);
$this->assertEquals('Route matches!', $traces[0]['log']);
}
}
0