8000 [Form] Add further timezone tests for date type by McSimp · Pull Request #12843 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Add further timezone tests for date type #12843

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

Merged
merged 1 commit into from
Dec 29, 2014

Conversation

McSimp
Copy link
Contributor
@McSimp McSimp commented Dec 4, 2014
Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no (failing tests added)
Fixed tickets Adds tests for bug in #12808
License MIT
Doc PR ~
#12404 removed the timezone options from DateType and TimeType, however the tests don't cover all cases and there was a bug introduced as per #12808.

This PR adds tests for the expected behaviour but will not fix the bug.

Unfortunately, it seems that the tests are being skipped in the form component on Travis (and have been for a year) - probably due to the ICU version being changed.

@@ -373,6 +373,60 @@ public function testSetDataWithDifferentTimezoneDateTime()
$this->assertEquals('02.06.2010', $form->getViewData());
}

public function testSetDataWithDifferentPositiveUTCTimezoneDateTime()
{
date_default_timezone_set('Pacific/Tahiti');

Choose a reason for hiding this comment

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

shouldn't you try to restore the original timezone after the test?

Copy link
Contributor

Choose a reason for hiding this comment

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

The setup and tear down methods take care of that

@fabpot
Copy link
Member
fabpot commented Dec 29, 2014

Thank you @McSimp.

@fabpot fabpot merged commit f919793 into symfony:2.6 Dec 29, 2014
fabpot added a commit that referenced this pull request Dec 29, 2014
This PR was merged into the 2.6 branch.

Discussion
----------

[Form] Add further timezone tests for date type

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no (failing tests added)
| Fixed tickets | Adds tests for bug in #12808
| License       | MIT
| Doc PR        | ~

#12404 removed the timezone options from DateType and TimeType, however the tests don't cover all cases and there was a bug introduced as per #12808.

This PR adds tests for the expected behaviour but will not fix the bug.

Unfortunately, it seems that the tests are being skipped in the form component on Travis (and have been for a year) - probably due to the ICU version being changed.

Commits
-------

f919793 [Form] Add further timezone tests for date type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0