public function RequestTest::testIntlLocale in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/RequestTest.php \Symfony\Component\HttpFoundation\Tests\RequestTest::testIntlLocale()
File
- vendor/
symfony/ http-foundation/ Tests/ RequestTest.php, line 1263
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testIntlLocale() {
if (!extension_loaded('intl')) {
$this
->markTestSkipped('The intl extension is needed to run this test.');
}
$request = new Request();
$request
->setDefaultLocale('fr');
$this
->assertEquals('fr', $request
->getLocale());
$this
->assertEquals('fr', \Locale::getDefault());
$request
->setLocale('en');
$this
->assertEquals('en', $request
->getLocale());
$this
->assertEquals('en', \Locale::getDefault());
$request
->setDefaultLocale('de');
$this
->assertEquals('en', $request
->getLocale());
$this
->assertEquals('en', \Locale::getDefault());
}