[dev] Problem executing Kronolith tests

Gonçalo Queirós goncalo.queiros at portugalmail.net
Wed Mar 28 17:34:16 UTC 2012


Hi there, i had problems (confirmed by Jan) running single Kronolith tests.

   I use the -d switch to change php include path, like: phpunit -d
include_path=<PATH_TO_HORDE_LIBS>
kronolith/test/Kronolith/Integration/AllDayTest.php

But i kept getting this error:

Class Kronolith_Integration_Driver_Sql_Base could not be found in...

   I debugged it and found out that because AllDayTest.php includes the
Autoload.php file it requires some extra test files, and then phpunit tries
to find the suitClassName but can't.
   I don't understand enough of phpunit to think its a bug on their code,
but this (https://github.com/sebastianbergmann/phpunit/issues/529) might be
a similar issue..

   I then tried to change the Horde test framework to fix this problem, and
came up with the attached patch (only changes Kronolith, but for the other
apps its probably the same).

   Currently i get errors running Kronolith AllTests.php and
Sql/Pdo/SqliteTest.php, but those errors have nothing to do with the
problem described here since i had them before, and they are not fixed by
this patch either (that is another fight).

   What do you think?
    
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-test-autoload.patch
Type: text/x-patch
Size: 6836 bytes
Desc: not available
URL: <http://lists.horde.org/archives/dev/attachments/20120328/f918d693/attachment.bin>


More information about the dev mailing list