Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

Problem with phpunit --skeleton

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


dnessett at yahoo

Aug 12, 2009, 9:22 AM

Post #1 of 1 (335 views)
Permalink
Problem with phpunit --skeleton

I have been playing around with phpunit, in particular its facility for generating tests from existing PHP code. You do this by processing a suitably annotated (using /* @assert ... */ comment lines) version of the file with phpunit --skeleton. Unfortunately, the --skeleton option assumes the file contains a class with the same name as the file.

For example, I tried annotating Hook.php and then processing it with phpunit --skeleton. It didn't work. phpunit reported:

Could not find class "Hook" in ".../phase3/tests/Hook.php"

(where I have replaced my path to MW with "...").

Since there are many MW files that do not contain classes of the same name as the file (or even classes at all), the --skeleton is probably not very useful for MW phpunit test generation.

You can still use phpunit by inserting the appropriate test code manually, but the objective of automatically generating tests with the same convenience as adding lines to parserTests.txt isn't available.

Dan




_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.