Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected vs Actual #9

Open
DavertMik opened this issue Apr 11, 2014 · 0 comments
Open

Expected vs Actual #9

DavertMik opened this issue Apr 11, 2014 · 0 comments

Comments

@DavertMik
Copy link

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]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant