assertContains is not type-safe for (non-object) primitive types
Currently the $checkForObjectIdentity parameter, as its name indicates, only check identity for object elements. Is there any reason the assertContains() method doesn't check identity also for primitive types?
Example:
$this->assertContains('hello', array(10, 45, 0)); // Success :(
This assert is unexpectedly successful due to the fact that 0 == 'hello' returns true.
This is successful whatever the value of the $checkForObjectIdentity parameter, because it only applies for elements of type Object.
Appears to be an issue again with latest stable as of the date of this writing.
@mhousser Please open a new ticket that include a minimal, self-contained, reproducing test case.
#2111 here you go. easy for me to reproduce in 5.2.10.