strpos() casts non-string $needle arguments to an integer and treats it as a
character code. This causes this test to fail:
assertThat("The answer is 42", containsString(42));
Given that the helper specifically states that the argument is a string, it
should cast it as such.
Q: Is this break in backward compatibility acceptable? Does anyone use this
method expecting it to search for a character code? Would a new
containsCharacter() helper be sufficient?
Original issue reported on code.google.com by dharkn...@gmail.com on 5 Aug 2013 at 9:58
Original issue reported on code.google.com by
dharkn...@gmail.com
on 5 Aug 2013 at 9:58