public function testThatCurrentCultureCanBeChanged() { $this->languageManager->addCulture('en-US-Super', new TestLanguage_enUS()); $firstValue = $this->languageManager->currentCulture(); $this->languageManager->setCulture('en-US-Super'); $secondValue = $this->languageManager->currentCulture(); $this->assertNotSame($firstValue, $secondValue); $this->assertInstanceOf(Language_enUS::class, $firstValue); $this->assertInstanceOf(TestLanguage_enUS::class, $secondValue); }
public function testVerbatimTextWithSpecialCharacters() { $tests = [[100, '$0', json_decode('"\\u00a3100"')], [100, '{$}0', '$100'], [100, '{foo }0o', 'foo 100th'], [100, '0o{ foo}', '100th foo'], [100, '{$ }0', '$ 100'], [100, '0{%}', '100%'], [100, '0{:}', '100:'], [100, '0{b}', '100b']]; $this->languageManager->setCulture('en-GB'); $this->runTestsOnArray($tests, 'format'); }