Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertArrayContains.php
Go to the documentation of this file.
1 <?php
7 
8 use PHPUnit\Framework\Assert;
9 
15 {
21  public static function assert(array $expected, array $actual)
22  {
23  foreach ($expected as $key => $value) {
24  Assert::assertArrayHasKey(
25  $key,
26  $actual,
27  "Expected value for key '{$key}' is missed"
28  );
29  if (is_array($value)) {
30  self::assert($value, $actual[$key]);
31  } else {
32  Assert::assertEquals(
33  $value,
34  $actual[$key],
35  "Expected value for key '{$key}' doesn't match"
36  );
37  }
38  }
39  }
40 }
$value
Definition: gender.phtml:16
static assert(array $expected, array $actual)