From: Aurelijus Date: Wed, 23 May 2012 09:53:17 +0000 (+0200) Subject: Simplify phpunit test names X-Git-Tag: conduit-6~306^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=2f3f45614b96c9916901c9e324ccc0b52aa1c0ad;p=arcanist.git Simplify phpunit test names Summary: More & more use cases come up with empty suite names, guessing and making test names nice is mess. Will leave it as it is, except data set part, as it could be super long. Test Plan: - Try running some phpunit tests with & without data sets Reviewers: epriestley CC: aran, Koolvin Differential Revision: https://secure.phabricator.com/D2544 --- diff --git a/src/unit/engine/phpunit/PhpunitTestEngine.php b/src/unit/engine/phpunit/PhpunitTestEngine.php index bcbd0a5e..221e8821 100644 --- a/src/unit/engine/phpunit/PhpunitTestEngine.php +++ b/src/unit/engine/phpunit/PhpunitTestEngine.php @@ -188,13 +188,7 @@ final class PhpunitTestEngine extends ArcanistBaseUnitTestEngine { } } - $pos = strpos($event->suite, '::'); - if ($pos === false) { - $name = substr($event->test, strlen($event->suite) + 2); - } else { - $name = substr($event->test, $pos + 2); - $name = preg_replace('/ \(array\(.*\)\)/', '', $name); - } + $name = preg_replace('/ \(.*\)/', '', $event->test); $result = new ArcanistUnitTestResult(); $result->setName($name);