Hello,

Actually my workaround is to extend Zend_Locale :

class MyLocale extends \Zend_Locale
{
    public static function flush()
    {
        self::$_auto = null;
        self::$_browser = null;
        self::$_environment = null;
        self::$_default = array('en' => true);
    }
}

And I call MyLocale::flush in the setUp() method on my tests.

Regards,
Emmanuel

2011/9/16 Emmanuel Bouton <[email protected]>:
> Hello,
>
> I'd like to test the plugin which set the locale in my application.
> My problem is that the Zend_Locale class stores the default settings
> in static variables ($_auto, $_browser, etc) and don't provide a
> method to refresh its.
> So the changes on my environment settings (HTTP_ACCEPT_LANGUAGE) in
> the beginning of my tests, are not taken into account (except in the
> first test).
>
> Does anyone have a suggestion to resolve my issue ?
> (don't want to activate processIsolation on phpunit ;))
>
> Thanks,
> Emmanuel
>

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to