PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Testing » PHPUnit2 » Bug #7750

Mockobjects methods calls are checked case sensitive

Details

Submitted2006-05-29 11:01 UTC
Fromkore at php dot net
StatusWont fix
PackagePHPUnit2
PHP Version5.1.4
OSLinux 2.6.16-gentoo-r3
Roadmaps(Not assigned)

Comments

[2006-05-29 11:01 UTC] kore at php dot net

Description:
------------
Methodnames are caseinsensitive in PHP, so that I would expect a test to pass, if I change the case of a methods name in MockObject::method().

Test script:
---------------
http://kore.phpugdo.de/mock_bug_case.phps

Expected result:
----------------
PHPUnit 3.0.0alpha3 by Sebastian Bergmann.

.

Time: 00:00

OK (1 test)

Actual result:
--------------
PHPUnit 3.0.0alpha3 by Sebastian Bergmann.

F

Time: 00:00
There was 1 failure:
1) testCaseSensitive(testMockedCalls)
Expected invocation count for is wrong.
expected integer <1>
difference <1>
got integer <0>
/usr/lib/php/php5.1-cvs/bin/phpunit:40

FAILURES!
Tests: 1, Failures: 1.

[2006-06-01 07:11 UTC] sebastian at php dot net

I would expect developers who use PHPUnit and Mock Objects to write code that runs even if class names, method names, etc. were not case-insensitive in PHP.