Skip to content

[Locale] Stub test failures #5288

Closed
@jmikola

Description

@jmikola

I ran the master branch's test suite and noticed a few errors that I wanted to share.

PHP version:

$ php -v
PHP 5.4.4-4~precise+1 (cli) (built: Aug  6 2012 13:01:46) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

Relevant intl extension output from php -i:

Internationalization support => enabled
version => 1.1.0
ICU version => 4.8.1.1
ICU Data version => 4.8.1

Directive => Local Value => Master Value
intl.default_locale => no value => no value
intl.error_level => 0 => 0

And the test failures:

There were 12 failures:

1) Symfony\Component\Locale\Tests\Stub\StubIntlDateFormatterTest::testFormatWithDefaultTimezoneIntl
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'1970-01-01 00:00:00'
+'1969-12-31 19:00:00'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubIntlDateFormatterTest.php:481

2) Symfony\Component\Locale\Tests\Stub\StubLocaleTest::testGetCurrenciesData
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$'
+'R$'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php:73

3) Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest::testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub with data set #0 (100, 'BRL', 'BR', '%s$100.00')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$100.00'
+'R$100.00'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php:195

4) Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest::testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub with data set #1 (-100, 'BRL', 'BR', '(%s$100.00)')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'(BR$100.00)'
+'(R$100.00)'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php:195

5) Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest::testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub with data set #2 (1000.12, 'BRL', 'BR', '%s$1,000.12')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$1,000.12'
+'R$1,000.12'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php:195

6) Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest::testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub with data set #3 (1000.121, 'BRL', 'BR', '%s$1,000.12')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$1,000.12'
+'R$1,000.12'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php:195

7) Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest::testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub with data set #4 (1000.123, 'BRL', 'BR', '%s$1,000.12')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$1,000.12'
+'R$1,000.12'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php:195

8) Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest::testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub with data set #5 (1000.125, 'BRL', 'BR', '%s$1,000.12')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$1,000.12'
+'R$1,000.12'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php:195

9) Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest::testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub with data set #6 (1000.127, 'BRL', 'BR', '%s$1,000.13')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$1,000.13'
+'R$1,000.13'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php:195

10) Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest::testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub with data set #7 (1000.129, 'BRL', 'BR', '%s$1,000.13')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$1,000.13'
+'R$1,000.13'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php:195

11) Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest::testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub with data set #8 (11.50999, 'BRL', 'BR', '%s$11.51')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$11.51'
+'R$11.51'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php:195

12) Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest::testFormatCurrencyWithCurrencyStyleBrazilianRealRoundingStub with data set #9 (11.9999464, 'BRL', 'BR', '%s$12.00')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$12.00'
+'R$12.00'

/home/jmikola/workspace/symfony/symfony/src/Symfony/Component/Locale/Tests/Stub/StubNumberFormatterTest.php:195

FAILURES!
Tests: 7721, Assertions: 17729, Failures: 12, Incomplete: 11, Skipped: 46.

Perhaps there is an issue with Symfony\Component\Locale\Tests\TestCase::isSameAsIcuVersion(), as it's the common factor for all of the Brazilian currency tests. I'm not sure what might be causing the first date test failure. My INI configuration has date.timezone = "America/New_York", but I don't think the test should require a UTC timezone.

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