diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-01-23 05:56:12 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-01-23 05:56:12 +0400 |
commit | 6156407125bed54bb7e48ac67fd6041f462b7ac4 (patch) | |
tree | 9b28a2c9aeef48686023edb6fcca6bf0010d7574 /tests/PHPUnit | |
parent | 8e3ccf6dd76aa72c4f0037e87760d7efae5909d0 (diff) |
Refs #1673 Also allow plugin tests in the /Test folder
Diffstat (limited to 'tests/PHPUnit')
-rw-r--r-- | tests/PHPUnit/bootstrap.php | 14 | ||||
-rw-r--r-- | tests/PHPUnit/phpunit.xml.dist | 1 |
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> |