PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Testing » PHPUnit2 » Bug #7675

Bug in assertEquals

Details

Submitted2006-05-19 19:54 UTC
Fromwebmaster at xp-development dot de
StatusBogus
PackagePHPUnit2
PHP Version5.1.4
OSApache 2.0
Roadmaps(Not assigned)

Comments

[2006-05-19 19:54 UTC] webmaster at xp-development dot de

Description:
------------
Hello..

I found a bug. The method assertEquals doesn't failed.

Test script:
---------------
$this->assertEquals(1, "1s");

[2006-05-20 06:54 UTC] sebastian at php dot net

Sorry, but your problem does not imply a bug in PEAR itself. For a
list of more appropriate places to ask for help using PEAR, please
visit http://pear.php.net/support/ as this bug system is not the
appropriate forum for asking support questions.

Thank you for your interest in PEAR.

That's the way PHP works:

sb@wopr-mobile ~ % php-shell.sh
PHP-Shell - Version 0.2.3 , with readline() support
(c) 2006, Jan Kneschke <jan@kneschke.de>

>> use '?' to open the inline help

>> var_dump(1 == '1s')
bool(true)

>> var_dump(1 === '1s')
bool(false)

In your case this means that you have to use assertSame() which uses the === operator.