Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertInterfaceLocaleAvailableOptions.php
Go to the documentation of this file.
1 <?php
7 
8 use Magento\Mtf\Constraint\AbstractConstraint;
10 
14 class AssertInterfaceLocaleAvailableOptions extends AbstractConstraint
15 {
16  /* tags */
17  const SEVERITY = 'middle';
18  /* end tags */
19 
26  public function processAssert(
28  $dropdownLocales = []
29  ) {
30  if ($_ENV['mage_mode'] === 'production') {
31  \PHPUnit\Framework\Assert::assertEquals(
33  $dropdownLocales
34  );
35  } else {
36  \PHPUnit\Framework\Assert::assertEmpty(
37  array_diff($dropdownLocales, $locales->getList(Locales::TYPE_ALL))
38  );
39  }
40  }
41 
47  public function toString()
48  {
49  return 'Interface locales list has correct values.';
50  }
51 }
$locales
Definition: locales.php:14