Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function ArrayDiffUnitTest::testArrayDiffAssocRecursive

Tests drupal_array_diff_assoc_recursive().

File

modules/simpletest/tests/common.test, line 3348

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 (drupal_array_diff_assoc_recursive ($this->array1 , $this->array2 ), $expected);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.