[dev] PHPUnit on pear-installed horde components Argument #1 of PHPUnit_Framework_TestSuite::addTestSuite() must be a class name or object

Jan Schneider jan at horde.org
Fri Feb 8 13:20:59 UTC 2013


Zitat von Mathieu Parent <math.parent at gmail.com>:

> 2013/2/8 Ralf Lang <lang at b1-systems.de>:
>>
>> Hi, I'm stuck running phpunit on a pear-installed Horde component.
>> I used to run tests against a git checkout/developer installation before.
>
> I suspect that this comes from the Autoloader not correctly
> constructing path from class name (or the opposite).
>
> In Debian, tests are under /usr/share/php/tests (ex:
> /usr/share/php/tests/Horde_Mail/Horde/Mail/AddressTest.php)
>
> but Horde_Test_Bootstrap::test() function wants a "test" directory
> (without "s"). No time to propose a patch, sorry.
>
> [1]:  
> http://git.horde.org/co.php/framework/Test/lib/Horde/Test/Bootstrap.php?rt=horde-git&r=9d57eb6a2212c4f3cf0877fdcc26a387d641057a

No, this is for finding the lib/ directory of *not* installed  
packages. Horde_Test still looks at the include path.

>> I have tried that under both debian and suse.
>>
>> pear channel-discover pear.horde.org
>> pear channel-discover pear.phpunit.de
>> pear channel-discover pear.symfony.com
>>
>> pear install horde/horde_role
>> ## run the config, set /usr/share/php5/PEAR/www/horde
>> pear install horde/horde
>> pear install horde/Horde_Test
>>
>> rlang:/usr/share/php5/PEAR/test/Horde_Core/Horde/Core # php AllTests.php
>> PHP Fatal error:  Uncaught exception 'PHPUnit_Framework_Exception'
>> with message 'Argument #1 of
>> PHPUnit_Framework_TestSuite::addTestSuite() must be a class name or
>> object' in /usr/share/php5/PEAR/PHPUnit/Util/InvalidArgumentHelper.php:69
>> Stack trace:
>> #0 /usr/share/php5/PEAR/PHPUnit/Framework/TestSuite.php(288):
>> PHPUnit_Util_InvalidArgumentHelper::factory(1, 'class name or o...')
>> #1 /usr/share/php5/PEAR/Horde/Test/AllTests.php(105):
>> PHPUnit_Framework_TestSuite->addTestSuite('Horde_Core_Hord...')
>> #2 /usr/share/php5/PEAR/Horde/Test/AllTests.php(82):
>> Horde_Test_AllTests->suite()
>> #3 /usr/share/php5/PEAR/test/Horde_Core/Horde/Core/AllTests.php(3):
>> Horde_Test_AllTests->run()
>> #4 {main}
>>   thrown in
>> /usr/share/php5/PEAR/PHPUnit/Util/InvalidArgumentHelper.php on line 69

-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the dev mailing list