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

Specify date fixture and fix expectations #913

Merged
merged 1 commit into from
Jan 6, 2015
Merged

Specify date fixture and fix expectations #913

merged 1 commit into from
Jan 6, 2015

Conversation

Vinai
Copy link
Contributor

@Vinai Vinai commented Jan 5, 2015

The test passes if the current date is during October - December (10-12), but fails for January - September (1-9)

In the test Magento\Framework\Data\Form\Element\DateTest::testGetValue() the expected format for the month part for the format Magento\Framework\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT is specifíed as m which is the placeholder for "Numeric representation of a month, with leading zeros".

However, in the file vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml the code for the month part matching the FORMAT_TYPE_SHORT is M.

According to the Zend Framework manual, this placeholder stands for "Month (Number of the month, one or two digits)".
(That placeholder value M is represented by the class constant Zend_Date::MONTH_SHORT).

So the month values are expected to have a leading zero, but Zend_Date formats them without the leading zero.

* Fix date_format expectation for month part
* Make test independent of current time
@vpelipenko
Copy link
Contributor

CR: passed
Builds: green
Resolution: ok to merge
Ticket: MAGETWO-32328

@maksek maksek self-assigned this Jan 6, 2015
maksek pushed a commit that referenced this pull request Jan 6, 2015
Specify date fixture and fix expectations (MAGETWO-32328)
@maksek maksek merged commit ce71c37 into magento:develop Jan 6, 2015
@orlangur orlangur mentioned this pull request Jan 8, 2015
@Vinai Vinai deleted the data-form-element-datetest branch January 8, 2015 15:57
@sshrewz sshrewz mentioned this pull request Mar 26, 2015
magento-team pushed a commit that referenced this pull request Apr 11, 2017
[TSG] MAGETWO-65339: [Backport] - [Performance] Optimize "Is Salable" check on Category page for Configurable Product - for 2.1.6
fe-lix- pushed a commit to fe-lix-/magento2 that referenced this pull request Apr 29, 2018
…d-into-reservation-order-id

Add Order Id into reservation's Metadata
strell added a commit to strell/magento2 that referenced this pull request Sep 22, 2019
 - Added new field genderV2 with the type of enum
 - Added data mapper in order to turn the gender value into genderV2 value and vice-versa
 - Extended api-functional tests
strell added a commit to strell/magento2 that referenced this pull request Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants