Example #1
0
 public function testGetAllowedLocalesGivenRedundantDataArray()
 {
     $this->configObject = (new \Magento\TestFramework\Helper\ObjectManager($this))->getObject('Magento\\Framework\\Locale\\Config', ['data' => ['allowedLocales' => $this::$samplePresentLocales]]);
     $retrievedLocalesWithRedundencies = $this->configObject->getAllowedLocales();
     $differences = array_diff($this::$allAllowedLocales, $retrievedLocalesWithRedundencies);
     $this->assertEmpty($differences);
     foreach ($this::$sampleAbsentLocales as $absentLocale) {
         $this->assertNotContains($absentLocale, $retrievedLocalesWithRedundencies);
     }
 }