Skip to content

Expected vs Actual #9

Description

@DavertMik

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]);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions