BossaConsulting / phpspec2-expect

Helper that decorates any SUS with a PhpSpec lazy object wrapper
MIT License
75 stars 34 forks source link

Missing file and line makes it difficult to figure out where the failure is #46

Closed walterdolce closed 3 years ago

walterdolce commented 7 years ago

Hi. In a scenario like the one below, where $foo and/or $baz return 00000:

# code

expect($foo)->notToBe('');

# more code

expect($baz)->notToBe('');

The error one gets (as expected) is:

Expected <value>""</value>, but got <value>"00000"</value>. (PhpSpec\Exception\Example\NotEqualException)

The fact that __FILE__ and __LINE__ is missing makes it painful for engineers to figure out where exactly the failure is. One has to resort to using var_dump, etc to get a clue.

This is basic yet fundamental info which should be included in the errors.

debo commented 4 years ago

@walterdolce we didn't forget about you. I'll have a look into this as soon as I can.

mlopes commented 3 years ago

@walterdolce this repo has been forked to friends-of-phpspec, maybe re-open the issue there, and close it here?

walterdolce commented 3 years ago