1.20.x common.test public ArrayDiffUnitTest::testArrayDiffAssocRecursive()

Tests backdrop_array_diff_assoc_recursive().

File

modules/simpletest/tests/common.test, line 3389
Tests for common.inc functionality.

Class

ArrayDiffUnitTest
Test array diff functions.

Code

public function testArrayDiffAssocRecursive() {
  $expected = array(
    'different' => 'no',
    'int_diff' => 1,
    // The 'array' key should not be returned, as it's the same.
    'array_diff' => array('same' => 'same'),
    'array_compared_to_string' => array('value'),
    'string_compared_to_array' => 'value',
    'new' => 'new',
  );

  $this->assertIdentical(backdrop_array_diff_assoc_recursive($this->array1, $this->array2), $expected);
}