What Brad said. In this case,  I believe the assertSame function should be
used instead, which emulates ===.
On Jun 7, 2013 1:55 PM, "Brad Jorsch" <[email protected]> wrote:

> On Fri, Jun 7, 2013 at 12:36 PM, Paul Selitskas <[email protected]>
> wrote:
> > What is wrong here? Wrong test case + issue in PHPUnit or what?
>
> Fun with PHP comparison. With the "==" and "!=" operators (which are
> what PHPUnit's assertEquals is probably using), PHP notices that "1"
> and "01" are both "numeric strings" so it decides to compare them as
> numbers.
>
> http://php.net/manual/en/language.operators.comparison.php
>
> --
> Brad Jorsch
> Software Engineer
> Wikimedia Foundation
>
> _______________________________________________
> Wikitech-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to