johnbillion / php-docs-standards

PHPUnit tests for documentation standards of PHP functions and methods.
GNU General Public License v2.0
24 stars 4 forks source link

Specify file paths instead of function and class names #1

Open johnbillion opened 8 years ago

johnbillion commented 8 years ago

Instead of specifying function and class names, the test case should instead specify a list of file paths which are then statically scanned for functions and classes, and tested.

This can be done using phpDocumentor/Reflection. The main problem this causes is that the dataProvider for the test needs to return a list of functions and class methods, which can get extremely long and - for a project such as WordPress - actually takes a considerable amount of time to generate.

I've done this previously as a patch on https://core.trac.wordpress.org/ticket/35065 but it needs some more work.