Skip to content

Fix wording for assertion failures #1

@nevadascout

Description

@nevadascout

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)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions