1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 13:30:55 +01:00

Fix local time test case for logged-out viewers using global settings

Summary:
In D16936, I changed logged-out viewers so they use global settings.

This can lead to a `SELECT` from an isolated unit test. Instead, give the test fixtures and use standard `generateNewUser()` stuff.

Test Plan: Ran `arc unit --everything`.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D16952
This commit is contained in:
epriestley 2016-11-28 06:51:03 -08:00
parent c5162074a1
commit ab3b707396

View file

@ -2,11 +2,17 @@
final class PhabricatorLocalTimeTestCase extends PhabricatorTestCase {
protected function getPhabricatorTestCaseConfiguration() {
return array(
self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true,
);
}
public function testLocalTimeFormatting() {
$user = new PhabricatorUser();
$user = $this->generateNewTestUser();
$user->overrideTimezoneIdentifier('America/Los_Angeles');
$utc = new PhabricatorUser();
$utc = $this->generateNewTestUser();
$utc->overrideTimezoneIdentifier('UTC');
$this->assertEqual(