[dev] PHPUnit 3.6 breaks unit tests
Jan Schneider
jan at horde.org
Tue Nov 8 09:35:03 UTC 2011
Zitat von Michael M Slusarz <slusarz at horde.org>:
> Quoting Jan Schneider <jan at horde.org>:
>
>> Zitat von Jan Schneider <jan at horde.org>:
>>
>>> Zitat von Michael M Slusarz <slusarz at horde.org>:
>>>
>>>> Quoting Michael M Slusarz <slusarz at horde.org>:
>>>>
>>>>> commit b0238d405280f40721d1811c4ffde68d5addb899
>>>>> Author: Michael M Slusarz <slusarz at horde.org>
>>>>> Date: Tue Nov 8 01:51:43 2011 -0700
>>>>>
>>>>> Without this require, PHPUnit 3.6 does not allow me to run any tests
>>>>>
>>>>> framework/Mime/test/Horde/Mime/AllTests.php | 1 +
>>>>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>>>>
>>>>> http://git.horde.org/horde-git/-/commit/b0238d405280f40721d1811c4ffde68d5addb899
>>>>
>>>> PHPUnit 3.6 is broken with our tests. IMAP Client example:
>>>>
>>>> slusarz at bigworm % php AllTests.php
>>>> PHP Fatal error: Class 'Horde_Test_Case' not found in
>>>> /disk2/src/horde/framework/Imap_Client/test/Horde/Imap/Client/UrlParseTest.php on line
>>>> 32
>>>>
>>>> Fatal error: Class 'Horde_Test_Case' not found in
>>>> /disk2/src/horde/framework/Imap_Client/test/Horde/Imap/Client/UrlParseTest.php on line
>>>> 32
>>>>
>>>> Not sure if my fix above is the correct fix to apply to all other
>>>> packages.
>>>
>>> Yes, that's the correct fix, an we already applied that
>>> incrementally when ever someone needs to run an individual test.
>>> It's not necessary for AllTests.php.
>>
>> Ah, you *did* add them to AllTests.php. That shouldn't be necessary.
>
> Yes - to run a test right now I have to manually add 'Autoload.php'
> to AllTests.php. Very annoying.
>
> This needs to be fixed somehow without tinkering with PHPUnit
> options (I am running a fully default installation, AFAIK).
It's strange, because it works in other packages without that line,
e.g. Horde_Date. Gunnar can probably say more about this.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the dev
mailing list