don't clean up the test environment if a data provider was finished

This commit is contained in:
Bjoern Schiessle 2014-08-13 11:41:11 +02:00
parent fc46fbd154
commit 1e0e870e18
1 changed files with 17 additions and 14 deletions

View File

@ -41,6 +41,8 @@ class TestCleanupListener implements PHPUnit_Framework_TestListener {
}
public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
// 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());
}
@ -57,6 +59,7 @@ class TestCleanupListener implements PHPUnit_Framework_TestListener {
printf("TestSuite '%s': Did not clean up proxies\n", $suite->getName());
}
}
}
private function isShowSuiteWarning() {
return $this->verbosity === 'suite' || $this->verbosity === 'detail';