Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-06-18 11:26:13 +0300
committerdiosmosis <benaka@piwik.pro>2015-06-20 03:09:13 +0300
commit1b0671cbb15c81a5affb44843f67d95b83f53629 (patch)
tree306bcd1c928731dd1d02d7b32997b703f8b1b006 /tests/PHPUnit/Framework/Fixture.php
parenta75bc3b621337e93d899c011f3f8a260e6cb13e4 (diff)
Make sure to destroy the environment in integration tests.
Diffstat (limited to 'tests/PHPUnit/Framework/Fixture.php')
-rw-r--r--tests/PHPUnit/Framework/Fixture.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php
index 9d74047e44..ceef2feab0 100644
--- a/tests/PHPUnit/Framework/Fixture.php
+++ b/tests/PHPUnit/Framework/Fixture.php
@@ -327,6 +327,8 @@ class Fixture extends \PHPUnit_Framework_Assert
$this->clearInMemoryCaches();
Log::unsetInstance();
+
+ $this->destroyEnvironment();
}
public function clearInMemoryCaches()
@@ -908,4 +910,14 @@ class Fixture extends \PHPUnit_Framework_Assert
$this->piwikEnvironment = new Environment($environment = null, $this->extraDefinitions);
$this->piwikEnvironment->init();
}
+
+ public function destroyEnvironment()
+ {
+ if ($this->piwikEnvironment === null) {
+ return;
+ }
+
+ $this->piwikEnvironment->destroy();
+ $this->piwikEnvironment = null;
+ }
}