O'Reilly logo
  • isaac peraza thinks this is interesting:

public function testCompareArrays() { $array1 = array(0,1,2,3); $array2 = array(6,7,8,9); // $array2 > $array1 $this->assertEquals(-1,compareArrays($array1,$array2)); // $array1 < $array2 $this->assertEquals(1,compareArrays($array2,$array1)); // $array2 = $array2 $this->assertEquals(0,compareArrays($array2,$array2)); }

From

Cover of PHPUnit Essentials

Note

Good Unit Test Example - Testing compareArrays() function