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

Fix wording for assertion failures #1

Open
nevadascout opened this issue Mar 23, 2016 · 1 comment
Open

Fix wording for assertion failures #1

nevadascout opened this issue Mar 23, 2016 · 1 comment
Assignees
Labels

Comments

@nevadascout
Copy link
Member

Some (most) assertion failures give strange "reason" messages. Example:

$this->Assert(false)->Should()->NotBeFalse();

fails for reason:
Failed asserting that false is true

The reason should be:
Failed asserting that false is not false


As a sidenote to this, the assertions should throw custom exceptions instead of calling PHPUnit's base asserter.

Example failure message

FluentAssertionException: expected true to be false because false is falsey"

(Custom reason provided starting at because)

@nevadascout nevadascout self-assigned this Mar 23, 2016
@nevadascout
Copy link
Member Author

Throwing exceptions also allows us to do internal reverse testing.

We'll be able to check that a test fails instead of trying to test every other possible combination.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant