phpunit - generate tests for all the classes from a directory

Posted by joe on Stack Overflow See other posts from Stack Overflow or by joe
Published on 2010-03-19T14:00:55Z Indexed on 2010/06/01 8:33 UTC
Read the original article Hit count: 222

Filed under:
|
|
|

Hi!

I have a directoy structure, and all the classes of the business logic are placed in the app_dir/lib/ directory. I would like to generate unit tests for all the classes from this lib/ folder.

The problem is, that I haven't found any option to specify the source directory, only the source file:

from app_dir:

phpunit --skeleton-class lib/

Error: "lib/.php" could not be opened.

Is it the only solution to write my own php script, which iterates through the /lib folder and calls the skeleton generator for every file found? And how can I specify the output folder, where all the generated test files are placed?

Thanx, Joe

© Stack Overflow or respective owner

Related posts about php

Related posts about phpunit