Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-10-10 05:52:48 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-10-10 05:52:48 +0400
commitafb3df190454fb98db0467be916b724398891b43 (patch)
tree3eeb591fe4362a83301987201cf1b0394fe414e0 /plugins
parentd1f27664efcb16665afddd103435abd3897ba716 (diff)
we will deprecate old test classes in 4 months and not in 2, simplified test run by only allowing short version, added some examples
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreConsole/Commands/TestsRun.php22
1 files changed, 10 insertions, 12 deletions
diff --git a/plugins/CoreConsole/Commands/TestsRun.php b/plugins/CoreConsole/Commands/TestsRun.php
index 2a5575d6ef..cf2d49b6a1 100644
--- a/plugins/CoreConsole/Commands/TestsRun.php
+++ b/plugins/CoreConsole/Commands/TestsRun.php
@@ -104,9 +104,8 @@ class TestsRun extends ConsoleCommand
{
if (empty($suite) && empty($groups)) {
foreach ($this->getTestsSuites() as $suite) {
- if (Common::stringEndsWith($suite, 'Tests')) {
- $this->executeTestGroups($suite, $groups, $options, $command, $output);
- }
+ $suite = $this->buildTestSuiteName($suite);
+ $this->executeTestGroups($suite, $groups, $options, $command, $output);
}
return;
@@ -121,7 +120,7 @@ class TestsRun extends ConsoleCommand
private function getTestsSuites()
{
- return array('unit', 'UnitTests', 'integration', 'IntegrationTests', 'system', 'SystemTests');
+ return array('unit', 'integration', 'system');
}
/**
@@ -165,20 +164,19 @@ class TestsRun extends ConsoleCommand
return;
}
- $suite = ucfirst($suite);
-
- if (Common::stringEndsWith($suite, 'tests')) {
- $suite = str_replace('tests', 'Tests', $suite);
- } elseif (strpos($suite, 'Tests') === false) {
- $suite = $suite . 'Tests';
- }
-
$availableSuites = $this->getTestsSuites();
if (!in_array($suite, $availableSuites)) {
throw new \InvalidArgumentException('Invalid testsuite specified. Use one of: ' . implode(', ', $availableSuites));
}
+ $suite = $this->buildTestSuiteName($suite);
+
return $suite;
}
+
+ private function buildTestSuiteName($suite)
+ {
+ return ucfirst($suite) . 'Tests';
+ }
} \ No newline at end of file