1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-24 06:20:55 +01:00

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
This commit is contained in:
Aurelijus 2012-05-23 11:53:17 +02:00
parent 833e8355d8
commit 2f3f45614b

View 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);