/**
  * @dataProvider getLocaleByCountryDataProvider
  */
 public function testGetLocaleByCountry(array $localeData, $countryCode, $expectedLocale, $defaultLocale = null)
 {
     $this->localeSettings->addLocaleData($localeData);
     if (null !== $defaultLocale) {
         $this->configManager->expects($this->once())->method('get')->with('oro_locale.locale')->will($this->returnValue($defaultLocale));
     } else {
         $this->configManager->expects($this->never())->method($this->anything());
     }
     $this->assertEquals($expectedLocale, $this->localeSettings->getLocaleByCountry($countryCode));
 }