Component/s: Coding style
I am trying to get my PHPUnit tests to pass the Moodle coding style checker, but it doesn't like some of the tags I use. The main PHPUnit tags I use are:
dataProvider // Useful for writing tests with a large set of data that can be programmatically generated.
group // If is even recommended in http://docs.moodle.org/dev/PHPUnit#Using_the_.40group_annotation
depends // Useful to ignore certain unit tests if a certain other one fails.
expectedException, expectedExceptionCode, expectedExceptionMessage // Useful for check that exceptions on error conditions occur rather than doing a try/catch (shorter code).
I haven't used "long" yet, but in the Moodle PHPUnit docs there is a section about long tests. Maybe if we can tag certain tests as being long, we can exclude them during the group filter: http://docs.moodle.org/dev/Writing_PHPUnit_tests#Long_tests
Also, I noticed that a lot of Moodle core unit tests have "@category phpunit", but that is an invalid category according to this checker. Should that be changed? Or core code changed to use "test" as a valid category?