Closed thekid closed 8 years ago
Thought of implementing this with ==
first, but may yield unexpected results for native instances containing XP objects when they define equality differently than a member-wise comparison.
Decided to implement this in XP core, and to bump the dependency on it to ^6.9.2
After 6.9.2 is released:
$ xp test -e '$this->assertEquals(new \ReflectionClass(self::class), new \ReflectionClass(self::class))'
[.]
♥: 1/1 run (0 skipped), 1 succeeded, 0 failed
Memory used: 1279.71 kB (1416.52 kB peak)
Time taken: 0.000 seconds
Fixed in 6.8.1-RELEASE
Discussed this with @mikey179 today,
assertEquals()
should also handle non-XP objects, using PHP's default object comparison mechanism, which is to compare objects by comparing all their members: