ZF-4992: testIsLocale(Zend_LocaleTest) unit tests failure.

Issue Type: Unit Tests: Problem Created: 2008-11-19T04:25:31.000+0000 Last Updated: 2008-12-01T13:50:44.000+0000 Status: Resolved Fix version(s): - 1.7.1 (01/Dec/08)

Reporter: Alexander Veremyev (alexander) Assignee: Thomas Weidner (thomas) Tags: - Zend_Locale

Related issues: - ZF-4991



{panel} 7) testIsLocale(Zend_LocaleTest) Failed asserting that is true. {panel}


Posted by Alexander Veremyev (alexander) on 2008-11-19T04:26:32.000+0000

The issue is probably [ZF-4991] related.

Posted by Thomas Weidner (thomas) on 2008-11-22T11:08:51.000+0000

I am unable to reproduce it with trunk.

I have changed unittests to set a locale when no locale is set in the environment. But this should not change the behaviour.

Can you please test it on your envoironment and bive some more informations ?

Posted by Ilya Gruzinov (shagren) on 2008-11-26T01:00:07.000+0000

This is reproducible with 1.7.0. version, but only on php <5.2(i test on 5.1.6)

php LocaleTest.php

PHPUnit 3.3.5 by Sebastian Bergmann.


Time: 4 seconds

There were 2 errors:

  1. testObjectCreation(Zend_LocaleTest) Object of class Zend_Locale to string conversion /tmp/ZendFramework-1.7.0/library/Zend/Locale.php:885 /tmp/ZendFramework-1.7.0/library/Zend/Locale.php:189

  2. testIsLocale(Zend_LocaleTest) Object of class Zend_Locale to string conversion /tmp/ZendFramework-1.7.0/library/Zend/Locale.php:885 /tmp/ZendFramework-1.7.0/library/Zend/Locale.php:732

FAILURES! Tests: 28, Assertions: 171, Errors: 2.

I think next lines can explain where mistake:… :

It is worth noting that before PHP 5.2.0 the __toString method was only called when it was directly combined with echo() or print(). Since PHP 5.2.0, it is called in any string context (e.g. in printf() with %s modifier) but not in other types contexts (e.g. with %d modifier). Since PHP 5.2.0, converting objects without __toString method to string would cause E_RECOVERABLE_ERROR.

Posted by Alexander Veremyev (alexander) on 2008-11-26T13:34:14.000+0000


I think it's another issue which I've just registered - [ZF-5077]

Posted by Thomas Weidner (thomas) on 2008-11-26T13:53:53.000+0000

Ilva, can you please review my comment on ZF-5077 and go further with your issue there ? I think it's already fixed.

Posted by Wil Sinclair (wil) on 2008-12-01T13:50:43.000+0000

Updating these issues to mark them resolved for 1.7.1.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.