[dev] PHPUnit 3.6 breaks unit tests
Michael M Slusarz
slusarz at horde.org
Tue Nov 8 19:34:06 UTC 2011
Quoting Jan Schneider <jan at horde.org>:
> 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.
Not for me:
---
slusarz at bigworm % php AllTests.php
PHPUnit 3.6.2 by Sebastian Bergmann.
PHP Fatal error: Class 'Horde_Date' not found in
/disk2/src/horde/framework/Date/test/Horde/Date/Repeater/WeekendTest.php on
line 17
Fatal error: Class 'Horde_Date' not found in
/disk2/src/horde/framework/Date/test/Horde/Date/Repeater/WeekendTest.php on
line 17
---
So something obviously changed between 3.5 -> 3.6. And yes, I was
also hoping Gunnar could weigh in on this :) I looked at the phpunit
changelog, but nothing really stuck out - wondering if it is some kind
of setting we need to add the phpunit.xml files to get this to work.
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list