Closed GoogleCodeExporter closed 8 years ago
The two assertThat() functions no longer return a value, but this doesn't
really affect anything since that results in them returning NULL.
I also changed assertThat() so that it accepts a single boolean argument for
generic assertions without a message (not recommended), or if the third
parameter is not a Matcher it is wrapped with equalTo().
assertThat('name', $user->getName(), 'bob');
I might be able to do the same thing with the two-argument case. If you pass a
string and boolean, I would assume you wanted the generic non-Matcher test:
assertThat('apples are tasty', $apple->isTasty());
Otherwise the second argument would be wrapped with equalTo() and the first
argument assumed to be the value to assert--not a message.
assertThat($apple->isTasty(), true);
The problem with that is if isTasty() is broken to return a string the
assertion would be interpreted as a generic boolean test and PASS.
Original comment by dharkn...@gmail.com
on 12 Jul 2010 at 6:33
Original issue reported on code.google.com by
emperorf...@gmail.com
on 2 Jul 2010 at 6:24