aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-08-13 11:41:11 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-08-13 11:41:11 +0200
commit1e0e870e18e8be6b35fd1ce374fc04c5f024bed5 (patch)
tree442fbfdffd97855052192a55443f2c12089425e8 /tests
parentfc46fbd1541bda8eb094bd8ee64827fa1cbf1fd0 (diff)
downloadnextcloud-server-1e0e870e18e8be6b35fd1ce374fc04c5f024bed5.tar.gz
nextcloud-server-1e0e870e18e8be6b35fd1ce374fc04c5f024bed5.zip
don't clean up the test environment if a data provider was finished
Diffstat (limited to 'tests')
-rw-r--r--tests/testcleanuplistener.php31
1 files changed, 17 insertions, 14 deletions
diff --git a/tests/testcleanuplistener.php b/tests/testcleanuplistener.php
index 8a9e9e6efbf..7b442bbd4f7 100644
--- a/tests/testcleanuplistener.php
+++ b/tests/testcleanuplistener.php
@@ -41,20 +41,23 @@ class TestCleanupListener implements PHPUnit_Framework_TestListener {
}
public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
- if ($this->cleanStorages() && $this->isShowSuiteWarning()) {
- printf("TestSuite '%s': Did not clean up storages\n", $suite->getName());
- }
- if ($this->cleanFileCache() && $this->isShowSuiteWarning()) {
- printf("TestSuite '%s': Did not clean up file cache\n", $suite->getName());
- }
- if ($this->cleanStrayDataFiles() && $this->isShowSuiteWarning()) {
- printf("TestSuite '%s': Did not clean up data dir\n", $suite->getName());
- }
- if ($this->cleanStrayHooks() && $this->isShowSuiteWarning()) {
- printf("TestSuite '%s': Did not clean up hooks\n", $suite->getName());
- }
- if ($this->cleanProxies() && $this->isShowSuiteWarning()) {
- printf("TestSuite '%s': Did not clean up proxies\n", $suite->getName());
+ // don't clean up the test environment if a data provider finished
+ if (!($suite instanceof PHPUnit_Framework_TestSuite_DataProvider)) {
+ if ($this->cleanStorages() && $this->isShowSuiteWarning()) {
+ printf("TestSuite '%s': Did not clean up storages\n", $suite->getName());
+ }
+ if ($this->cleanFileCache() && $this->isShowSuiteWarning()) {
+ printf("TestSuite '%s': Did not clean up file cache\n", $suite->getName());
+ }
+ if ($this->cleanStrayDataFiles() && $this->isShowSuiteWarning()) {
+ printf("TestSuite '%s': Did not clean up data dir\n", $suite->getName());
+ }
+ if ($this->cleanStrayHooks() && $this->isShowSuiteWarning()) {
+ printf("TestSuite '%s': Did not clean up hooks\n", $suite->getName());
+ }
+ if ($this->cleanProxies() && $this->isShowSuiteWarning()) {
+ printf("TestSuite '%s': Did not clean up proxies\n", $suite->getName());
+ }
}
}