aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-08-13 15:01:29 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-08-13 15:01:29 +0200
commit9ab0ebbedc2660b1ed4fd5b84927295a6a2cc2fd (patch)
tree4c8b2690e53a846d6e05ef8974e2e9e6f4cf588c
parentf282a5cff00d2e7ecbfaa0d93d7ab0bf30921701 (diff)
parent1e0e870e18e8be6b35fd1ce374fc04c5f024bed5 (diff)
downloadnextcloud-server-9ab0ebbedc2660b1ed4fd5b84927295a6a2cc2fd.tar.gz
nextcloud-server-9ab0ebbedc2660b1ed4fd5b84927295a6a2cc2fd.zip
Merge pull request #10387 from owncloud/quick_fix_for_unit_tests
don't clean up the test environment if a data provider was finished
-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());
+ }
}
}