]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Simplify phpunit test names
authorAurelijus <aurelijus@astdev.lt>
Wed, 23 May 2012 09:53:17 +0000 (11:53 +0200)
committerAurelijus <aurelijus@astdev.lt>
Wed, 23 May 2012 09:55:01 +0000 (11:55 +0200)
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

index bcbd0a5e7aac055a4304cf26030b0a7c341ef337..221e8821d3658a0bf7f2ca473bd244e8383b3705 100644 (file)
@@ -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);