Example #1
0
 public function testGetAllowedCurrenciesGivenRedundantDataArray()
 {
     $this->configObject = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))->getObject('Magento\\Framework\\Locale\\Config', ['data' => ['allowedCurrencies' => $this::$samplePresentCurrencies]]);
     $retrievedCurrenciesWithRedundencies = $this->configObject->getAllowedCurrencies();
     $differences = array_diff($this::$allAllowedCurrencies, $retrievedCurrenciesWithRedundencies);
     $this->assertEmpty($differences);
     foreach ($this::$sampleAbsentCurrencies as $absentCurrency) {
         $this->assertNotContains($absentCurrency, $retrievedCurrenciesWithRedundencies);
     }
 }