From 7e0295ce6fc679a1564bcd5dc4d4cc72c2682035 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 22 Jan 2016 01:48:17 -0800 Subject: [PATCH] CRM-17860 - tools/scripts/phpunit - Fix for 'Civi\Foo\Bar' --- tools/scripts/phpunit | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.25.1