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:
authormattab <matthieu.aubry@gmail.com>2014-01-23 05:56:12 +0400
committermattab <matthieu.aubry@gmail.com>2014-01-23 05:56:12 +0400
commit6156407125bed54bb7e48ac67fd6041f462b7ac4 (patch)
tree9b28a2c9aeef48686023edb6fcca6bf0010d7574 /tests/PHPUnit
parent8e3ccf6dd76aa72c4f0037e87760d7efae5909d0 (diff)
Refs #1673 Also allow plugin tests in the /Test folder
Diffstat (limited to 'tests/PHPUnit')
-rw-r--r--tests/PHPUnit/bootstrap.php14
-rw-r--r--tests/PHPUnit/phpunit.xml.dist1
2 files changed, 10 insertions, 5 deletions
diff --git a/tests/PHPUnit/bootstrap.php b/tests/PHPUnit/bootstrap.php
index fdc1950033..0bce3584e4 100644
--- a/tests/PHPUnit/bootstrap.php
+++ b/tests/PHPUnit/bootstrap.php
@@ -48,12 +48,16 @@ require_once file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')
// require test fixtures
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/BaseFixture.php';
-foreach (glob(PIWIK_INCLUDE_PATH . '/tests/PHPUnit/Fixtures/*.php') as $file) {
- require_once $file;
-}
-foreach (glob(PIWIK_INCLUDE_PATH . '/plugins/*/tests/Fixtures/*.php') as $file) {
- require_once $file;
+$fixturesToLoad = array(
+ '/tests/PHPUnit/Fixtures/*.php',
+ '/plugins/*/tests/Fixtures/*.php',
+ '/plugins/*/Test/Fixtures/*.php',
+);
+foreach($fixturesToLoad as $fixturePath) {
+ foreach (glob(PIWIK_INCLUDE_PATH . $fixturePath) as $file) {
+ require_once $file;
+ }
}
// General requirement checks & help: a webserver must be running for tests to work!
diff --git a/tests/PHPUnit/phpunit.xml.dist b/tests/PHPUnit/phpunit.xml.dist
index 896f1b3163..6b13b5dcae 100644
--- a/tests/PHPUnit/phpunit.xml.dist
+++ b/tests/PHPUnit/phpunit.xml.dist
@@ -36,6 +36,7 @@
<testsuite name="PluginTests">
<directory>./Plugins</directory>
<directory>../../plugins/*/tests</directory>
+ <directory>../../plugins/*/Test</directory>
</testsuite>
<testsuite name="CoreTests">
<directory>./Core</directory>