I'm following civix's upgrade instructions to enable unit tests to be executed with standalone phpunit.
I've got my code in a work-in-progress git branch. The first commit captures the civix-generated boilerplate phpunit.xml.dist and bootstrap.php. The second commit captures my attempts to adapt an existing test to the new way of doing things.
With these changes in place, I do:
$ cd /path/to/webroot/sites/all/modules/civicrm/tools/extensions/civivolunteer
$ phpunit4 tests/phpunit/api/v3/VolunteerProjectTest.php
... and get:
PHP Fatal error: Class 'VolunteerTestAbstract' not found in /path/to/webroot/sites/all/modules/civicrm/tools/extensions/civivolunteer/tests/phpunit/api/v3/VolunteerProjectTest.php on line 6
PHP Stack trace:
PHP 1. {main}() /usr/local/lib/civicrm-buildkit/bin/phpunit4:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/local/lib/civicrm-buildkit/bin/phpunit4:545
PHP 3. PHPUnit_TextUI_Command->run() phar:///usr/local/lib/civicrm-buildkit/bin/phpunit4/phpunit/TextUI/Command.php:100
PHP 4. PHPUnit_Runner_BaseTestRunner->getTest() phar:///usr/local/lib/civicrm-buildkit/bin/phpunit4/phpunit/TextUI/Command.php:123
PHP 5. PHPUnit_Runner_BaseTestRunner->loadSuiteClass() phar:///usr/local/lib/civicrm-buildkit/bin/phpunit4/phpunit/Runner/BaseTestRunner.php:67
PHP 6. PHPUnit_Runner_StandardTestSuiteLoader->load() phar:///usr/local/lib/civicrm-buildkit/bin/phpunit4/phpunit/Runner/BaseTestRunner.php:123
PHP 7. PHPUnit_Util_Fileloader::checkAndLoad() phar:///usr/local/lib/civicrm-buildkit/bin/phpunit4/phpunit/Runner/StandardTestSuiteLoader.php:39
PHP 8. PHPUnit_Util_Fileloader::load() phar:///usr/local/lib/civicrm-buildkit/bin/phpunit4/phpunit/Util/Fileloader.php:38
PHP 9. include_once() phar:///usr/local/lib/civicrm-buildkit/bin/phpunit4/phpunit/Util/Fileloader.php:56
Any suggestions?