Skip to content

Commit

Permalink
Restoring default locale after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jul 27, 2014
1 parent 3eb4345 commit e40ad07
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion tests/TestCase/I18n/I18nTest.php
Expand Up @@ -27,6 +27,23 @@
*/
class I18nTest extends TestCase {

/**
* Used to restore the internal locale after tests
*
* @var string
*/
public $locale;

/**
* Set Up
*
* @return void
*/
public function setUp() {
parent::setUp();
$this->locale = I18n::defaultLocale();
}

/**
* Tear down method
*
Expand All @@ -36,7 +53,7 @@ public function tearDown() {
parent::tearDown();
I18n::clear();
I18n::defaultFormatter('basic');
I18n::defaultLocale('en_US');
I18n::defaultLocale($this->locale);
Plugin::unload();
}

Expand Down

0 comments on commit e40ad07

Please sign in to comment.