Skip to content

Commit e16a686

Browse files
committed
Merge branch '5.1' into 5.2
* 5.1: Use ::class keyword when possible
2 parents 8b95d5b + b768033 commit e16a686

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/Translation/TranslatorTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function testTransWithCachingWithInvalidLocale()
102102
$this->expectException('InvalidArgumentException');
103103
$this->expectExceptionMessage('Invalid "invalid locale" locale.');
104104
$loader = $this->getMockBuilder('Symfony\Component\Translation\Loader\LoaderInterface')->getMock();
105-
$translator = $this->getTranslator($loader, ['cache_dir' => $this->tmpDir], 'loader', '\Symfony\Bundle\FrameworkBundle\Tests\Translation\TranslatorWithInvalidLocale');
105+
$translator = $this->getTranslator($loader, ['cache_dir' => $this->tmpDir], 'loader', TranslatorWithInvalidLocale::class);
106106

107107
$translator->trans('foo');
108108
}
@@ -308,7 +308,7 @@ protected function getContainer($loader)
308308
return $container;
309309
}
310310

311-
public function getTranslator($loader, $options = [], $loaderFomat = 'loader', $translatorClass = '\Symfony\Bundle\FrameworkBundle\Translation\Translator', $defaultLocale = 'en', array $enabledLocales = [])
311+
public function getTranslator($loader, $options = [], $loaderFomat = 'loader', $translatorClass = Translator::class, $defaultLocale = 'en', array $enabledLocales = [])
312312
{
313313
$translator = $this->createTranslator($loader, $options, $translatorClass, $loaderFomat, $defaultLocale, $enabledLocales);
314314

@@ -390,7 +390,7 @@ public function testLoadingTranslationFilesWithDotsInMessageDomain()
390390
$this->assertEquals('It works!', $translator->trans('message', [], 'domain.with.dots'));
391391
}
392392

393-
private function createTranslator($loader, $options, $translatorClass = '\Symfony\Bundle\FrameworkBundle\Translation\Translator', $loaderFomat = 'loader', $defaultLocale = 'en', array $enabledLocales = [])
393+
private function createTranslator($loader, $options, $translatorClass = Translator::class, $loaderFomat = 'loader', $defaultLocale = 'en', array $enabledLocales = [])
394394
{
395395
if (null === $defaultLocale) {
396396
return new $translatorClass(

0 commit comments

Comments
 (0)