dependency-injection-example
dependency-injection-example copied to clipboard
Expected vs Actual
Thanks to the great tutorials! I noticed a mistake in your code
https://github.com/daylerees/dependency-injection-example/blob/master/part-9/tests/SocialFeedTest.php#L41
$this->assertEquals($v[0], 'foo');
$this->assertEquals($v[1], 'bar');
$this->assertEquals($v[2], 'baz');
$this->assertEquals($v[3], 'boo');
$this->assertEquals($v[4], 'bop');
In PHPUnit (as well as all xUnit frameworks) the first argument in assertion is expected, and second is actual. So you should flip this code to look like:
$this->assertEquals('foo', $v[0]);