php - How to set up PHPUnit for an Apigility ZF2 application with multiple versions? -
the phpunit.xml
common zf2 application common folders structure
... /phpunit /phpunit/phpunit.xml /module /module/application /module/modulefoo /module/modulebar ...
can defined follows:
<phpunit> <testsuites> <testsuite name="modules"> <directory>../modules/application/tests</directory> <directory>../modules/modulefoo/tests</directory> <directory>../modules/modulebar/tests</directory> </testsuite> </testsuites> </phpunit>
now i'm writing apigility driven rest api application, have multiple verisions in future.
... /phpunit /phpunit/phpunit.xml /module /module/application /module/modulebuzapi /module/modulebuzapi/v1 /module/modulebuzapi/v2 ... /module/modulebuzapi/vn ...
i can define test suite every version, i'll have copy&paste every new version. there more elegant approach?
maybe use wildcard?
for instance:
<testsuites> <testsuite name="modules"> <directory>../modules/*/tests</directory> </testsuite> </testsuites>
Comments
Post a Comment