Hello Robert,
yeah that did the trick :-)
I had to rename the class name and the warning disappeared. The
file_structure has been ok before. I just renamed some stuff in the code
I've posted. But good to know that this fixed structure is important for
unittest.
Now I'm wondering why phpunit did no write the coverage report into the
given dir, but thanks to you I can go on to the next steps.
Nevertheless I have to say that this really could have been mentioned in
the wiki. Perhaps I write a tutorial myself to prevent other developers
running into the same problems.
Regards and also Greets to Andreas and Veith
André
Am 27.05.2011 09:10, schrieb anzido GmbH:
Hi,
I think the problem is your directory / class structure:
Warning: class not found:
unit_modules_MyPaymentExtension_MyPaymentExtensionTest in
unit/modules/ModuleName/MyPaymentExtensionTest.php
Phpunit expects the class names to match the directories, with an underscore
used as a separator.
This means that the MyPaymentExtensionTest.php file must be in the directory
unit/modules/MyPaymentExtension/myPaymentExtensionTest.php (and not in
unit/modules/ModuleName).
And your test class name must be
unit_modules_MyPaymentExtension_MyPaymentExtensionTest (not just
MyPaymentExtensionTest).
I'm not sure about the bootstrap.php changes, because we didn't edit this in
our environment as far as i can remember. But it looks as if you include all
tests from the directory unit/modules/ModuleName instead of
unit/modules/MyPaymentExtension. I think you will have to change this to
unit/modules/MyPaymentExtension, too.
I hope this helps you get the unit tests running... As Ma�vydas said, it can be
quite a lot of work when you get started with that. We've set up the unit tests
in our XAMPP environment and that also required some experimenting and
debugging until everything worked ;-)
Best regards from Dortmund!
Robert Rosendahl | Entwicklung u. Support
--
André Herrmann
Entwicklung, Administration, Projektmanagement
mail [ [email protected] ]
web [ www.fatchip.de ]
FATCHIP [ GmbH ] | sitz [ Helmholtzstrasse 2-9 | 10587 Berlin ] | fon [
030.39 88 93 51 ] | fax [ 030.39 88 93 52 ] | mail [ [email protected] ]
| Ust-Id. [ DE 265567757 ] | Amtsgericht [ Berlin-Charlottenburg ] | HRB
[120567 B] | Geschäftsführung [ Dipl.-Ing. Hendrik Bahr ]
Be Smart, Go Green. Don’t print this email unless you really need to.
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general