Issues

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

Description

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

Comments

The issue is probably [ZF-4991] related.

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 ?

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.

E......................E....

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: http://php.net/manual/en/… :

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.

Ilya,

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

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

Updating these issues to mark them resolved for 1.7.1.