[Pkg-owncloud-commits] [owncloud] 183/258: don't clean up the test environment if a data provider was finished

David Prévot taffit at moszumanska.debian.org
Sat Oct 11 17:22:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 02374e595af0d9910e2bd5e0b3181afe07df0625
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Wed Aug 13 11:41:11 2014 +0200

    don't clean up the test environment if a data provider was finished
---
 tests/testcleanuplistener.php | 31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/tests/testcleanuplistener.php b/tests/testcleanuplistener.php
index 7065f03..fe4fef6 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());
+			}
 		}
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list