From: Tim Otten Date: Fri, 22 Jan 2016 09:48:17 +0000 (-0800) Subject: CRM-17860 - tools/scripts/phpunit - Fix for 'Civi\Foo\Bar' X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7e0295ce6fc679a1564bcd5dc4d4cc72c2682035;p=civicrm-core.git CRM-17860 - tools/scripts/phpunit - Fix for 'Civi\Foo\Bar' --- diff --git a/tools/scripts/phpunit b/tools/scripts/phpunit index d41a2f0c36..72e46ef00c 100755 --- a/tools/scripts/phpunit +++ b/tools/scripts/phpunit @@ -30,9 +30,12 @@ array_shift($argv); // Convert class names to file names foreach ($argv as $k => $v) { - if (preg_match('/^(CRM_|api_v3|_Civi_|WebTest_)/', $v)) { + if (preg_match('/^(CRM_|api_v3|WebTest_)/', $v)) { $argv[$k] = 'tests/phpunit/' . strtr($v, '_', '/') . '.php'; } + elseif (preg_match('/^Civi\\\\/', $v)) { + $argv[$k] = 'tests/phpunit/' . strtr($v, '\\', '/') . '.php'; + } } // Transition: Make sure we use phpunit code from PATH, not