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

Mathieu Parent math.parent at gmail.com
Fri Feb 8 13:15:20 UTC 2013


2013/2/8 Ralf Lang <lang at b1-systems.de>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 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

> 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
>
>
> - --
> Ralf Lang
> Linux Consultant / Developer
> Tel.: +49-170-6381563
> Mail: lang at b1-systems.de
> B1 Systems GmbH
> Osterfeldstra￟e 7 / 85088 Vohburg / http://www.b1-systems.de
> GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.19 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlEU82IACgkQCs1dsHJ/X7AW/gCbBneQlqzEfPHvxHBE+X7DaMah
> /zcAnj88ME6HP5NgJ9ELN1SkK4AbGoK1
> =31t/
> -----END PGP SIGNATURE-----
> --
> dev mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org



--
Mathieu


More information about the dev mailing list