Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Intl] Date tests broken without intl extension, IntlDateFormatter #15049

Closed
@ewgRa

Description

@ewgRa

When intl extension not installed, many tests that use IntlDateFormatter is broken. For example:

1) Symfony\Component\Validator\Tests\Constraints\RangeValidatorTest::testInvalidDatesCombinedMin with data set #0 (DateTime Object (...), 'Mar 20, 2013, 12:00 AM')
Failed asserting that two objects are equal.
--- Expected
+++ Actual
@@ @@
 Symfony\Component\Validator\ConstraintViolation Object (
     'message' => null
     'messageTemplate' => 'myMinMessage'
     'parameters' => Array (
-        '{{ value }}' => 'Mar 20, 2013, 12:00 AM'
-        '{{ limit }}' => 'Mar 10, 2014, 12:00 AM'
+        '{{ value }}' => 'Mar 20, 2013 12:00 AM'
+        '{{ limit }}' => 'Mar 10, 2014 12:00 AM'
     )
     'plural' => null
     'root' => 'root'
     'propertyPath' => 'property.path'
     'invalidValue' => 'InvalidValue'
     'constraint' => Symfony\Component\Validator\Constraints\NotNull Object (...)
     'code' => 3
     'cause' => null
 )

When I install intl extension with ICU 52.1 and change getIcuStubVersion to my ICU version - tests passed without failures.

I write PR #15045 that fix it in my machine, but seems it broke tests that run on travis and I can't find reason why on travis native IntDateFormatter return no comma after year, but later in tests start returning with comma.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions