Skip to content
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

No fallback to REQUEST_TIME in TimeDataCollector #21156

Merged
merged 1 commit into from Jan 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -39,7 +39,7 @@ public function collect(Request $request, Response $response, \Exception $except
if (null !== $this->kernel) {
$startTime = $this->kernel->getStartTime();
} else {
$startTime = $request->server->get('REQUEST_TIME_FLOAT', $request->server->get('REQUEST_TIME'));
$startTime = $request->server->get('REQUEST_TIME_FLOAT');
}

$this->data = array(
Expand Down
Expand Up @@ -29,7 +29,7 @@ public function testCollect()

$c->collect($request, new Response());

$this->assertEquals(1000, $c->getStartTime());
$this->assertEquals(0, $c->getStartTime());
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't you change line 28 instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That test is already covered on line 34. I wanted to keep this case as a regression that REQUEST_TIME is not used when REQUEST_TIME_FLOAT is not filled in


$request->server->set('REQUEST_TIME_FLOAT', 2);

Expand Down