Commit 9fd3215e authored by ayduns's avatar ayduns

Add new testing helper: assertArrayValuesEqual($a1, $a2) - compare array values

parent 3f52ee8b
......@@ -684,6 +684,18 @@ class CiviUnitTestCase extends PHPUnit_Extensions_Database_TestCase {
);
}
/**
* @param $expected
* @param $actual
*/
public function assertArrayValuesEqual($array1, $array2) {
$array1 = array_values($array1);
$array2 = array_values($array2);
sort($array1);
sort($array2);
$this->assertEquals($array1, $array2);
}
/**
* @param $expected
* @param $actual
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment