From 2f3f45614b96c9916901c9e324ccc0b52aa1c0ad Mon Sep 17 00:00:00 2001 From: Aurelijus Date: Wed, 23 May 2012 11:53:17 +0200 Subject: [PATCH] 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 --- src/unit/engine/phpunit/PhpunitTestEngine.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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);