Fix tests

This commit is contained in:
Pierre Rudloff 2017-05-29 22:00:30 +02:00
parent d78335d937
commit e64bb9b9f5

View file

@ -15,14 +15,33 @@ use Slim\Http\Response;
*/
class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
{
/**
* Original locale.
*
* @var string
*/
private $locale;
/**
* Prepare tests.
*/
protected function setUp()
{
$this->locale = getenv('LANG');
$this->middleware = new LocaleMiddleware();
}
/**
* Restore environment after the tests.
*
* @return void
*/
protected function tearDown()
{
putenv('LANG='.$this->locale);
setlocale(LC_ALL, $this->locale);
}
/**
* Test the testLocale() function.
*