I'm using PHPUnit 3.7.10 via CakePHP v2.3 and I run the following:
$this->assertEquals(array('a', 'b', 'c'), array('a', 'c', 'd'));
And all I get is:
Failed asserting that two arrays are equal.
Why do I not get the diff below as outlined here? http://www.phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.assertions.assertEquals.example5
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
0 => 'a'
- 1 => 'b'
- 2 => 'c'
+ 1 => 'c'
+ 2 => 'd'
)
What am I missing?
Update. Test file called via test.php?case=Cache/Engine/PhpUnit&debug=1
<?php
class PhpUnitTest extends CakeTestCase {
public function testDiff() {
$this->assertEquals(array('a', 'b', 'c'), array('a', 'c', 'd'));
}
}