Even though PHP doesn't have a natural equals() method concept, it makes more
sense to compare two objects using one's equals() method rather than comparing
that they have the same class.
assertThat($foo, is($bar));
This should be equivalent to
assertThat($foo->equals($bar), is(true));
because it's far more interesting than
assertThat(get_class($foo), is(get_class($bar)));
A new sameClass() matcher or overriding anInstanceOf() to accept an object
would make more sense for the last case.
Original issue reported on code.google.com by dharkn...@gmail.com on 16 Dec 2011 at 7:02
Original issue reported on code.google.com by
dharkn...@gmail.com
on 16 Dec 2011 at 7:02