Use setlocale. Catch errors when setting locale. Restore environment after test.
authorGunnar Wrobel <p@rdus.de>
Mon, 18 Oct 2010 05:06:13 +0000 (07:06 +0200)
committerGunnar Wrobel <p@rdus.de>
Mon, 18 Oct 2010 12:49:20 +0000 (14:49 +0200)
commitfacaa53b69d3499289a445f083a8339f09d2878c
tree5e16e36b7458839f838ed5ce3923a138207132af
parent1a670aa19e143666862165e67f730152933580b3
Use setlocale. Catch errors when setting locale. Restore environment after test.

For me the test didn't run without also calling setlocale(). Added
this based on the PHPUnit setLocale() call which resets to the
old locale after testing.

In case setting the locale fails the tests will be skipped.

I'm not certain how environment variables will be handled by PHPUnit
but to be on the safe side I rather reset them after the test.
framework/Translation/test/Horde/Translation/GettextTest.php