PEAR is archived and read-only

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

Home » Testing » PHPUnit2 » Bug #7134

Constructor of test case - Mysterious warning

Details

Submitted2006-03-16 18:53 UTC
Frommaxx dot gass at gmail dot com
Assignedsebastian
StatusClosed
PackagePHPUnit2
PHP Version5_1 CVS-2006-03-16
Roadmaps(Not assigned)

Comments

[2006-03-16 18:53 UTC] maxx dot gass at gmail dot com

Description:
------------

Actual result:
--------------
PHPUnit @package_version@ by Sebastian Bergmann.

FFF

Time: 00:00
There were 3 failures:
1) Warning(PHPUnit2_Framework_Warning)
Constructor of class System_Tests_HooksTest is not
TestCase($name) or TestCase().
/home/maxx/bin/phpunit:40
2) Warning(PHPUnit2_Framework_Warning)
Constructor of class System_Tests_HooksTest is not
TestCase($name) or TestCase().
/home/maxx/bin/phpunit:40
3) Warning(PHPUnit2_Framework_Warning)
Constructor of class System_Tests_HooksTest is not
TestCase($name) or TestCase().
/home/maxx/bin/phpunit:40

FAILURES!
Tests: 3, Failures: 3.

[2006-03-16 18:55 UTC] sebastian at php dot net

You are using incompatible versions of PHP 5.1.3-CVS and PHPUnit2-3.0.0-CVS.

[2006-03-16 19:00 UTC] maxx dot gass at gmail dot com

OK, i've just checked out PHPUnit2 again.

Now i get this:

PHPUnit @package_version@ by Sebastian Bergmann.


Strict Standards: Declaration of
Mock_System_Tests_SimpleHook::onTest() should be
compatible with that of System_Tests_SimpleHook::onTest()
in /home/maxx/PHP/PHPUnit3/pear/PHPUnit2/Extensions/MockObject/Mock.php(146) :
eval()'d code on line 1
.
Fatal error: Argument 1 passed to
Mock_System_Tests_SimpleHook::onTest() must be an object
of class System_Tests_SimpleHook
in /home/maxx/PHP/PHPUnit3/pear/PHPUnit2/Extensions/MockObject/Mock.php(146) :
eval()'d code on line 28

[2006-03-16 19:18 UTC] maxx dot gass at gmail dot com

OK, here's how to fix it: Just replace the
ReflectionParameter::getDeclaringClass() call in
Extensions/MockObject/Mock.php back to
ReflectionParameter::getClass()

[2006-03-16 19:32 UTC] sebastian at php dot net

This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.