From fd6a02b215ad70af247922f547299f19d12dfe7f Mon Sep 17 00:00:00 2001 From: osaid Date: Sun, 8 Jan 2017 13:03:28 +0530 Subject: [PATCH] moved tearDown method to PMATestCase Signed-off-by: osaid --- test/PMATestCase.php | 14 ++++++++++++++ test/libraries/core/PMA_headerLocation_test.php | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/test/PMATestCase.php b/test/PMATestCase.php index 2d170cce9f..a850e1e9a9 100644 --- a/test/PMATestCase.php +++ b/test/PMATestCase.php @@ -47,4 +47,18 @@ class PMATestCase extends PHPUnit_Framework_TestCase $this->attrInstance->setAccessible(true); $this->attrInstance->setValue($mockResponse); } + /** + *Tear down function for mockResponse method + * + *@return void + */ + protected function tearDown() + { + if(isset($this->attrInstance, $this->restoreInstance)) + { + $this->attrInstance->setValue($this->restoreInstance); + unset($this->restoreInstance); + unset($this->attrInstance); + } + } } \ No newline at end of file diff --git a/test/libraries/core/PMA_headerLocation_test.php b/test/libraries/core/PMA_headerLocation_test.php index f311196778..18864415a1 100644 --- a/test/libraries/core/PMA_headerLocation_test.php +++ b/test/libraries/core/PMA_headerLocation_test.php @@ -149,18 +149,4 @@ class PMA_HeaderLocation_Test extends PMATestCase $attrInstance->setValue($restoreInstance); } - /** - *Tear down function for mockResponse method - * - *@return void - */ - public function tearDown() - { - if(isset($this->attrInstance, $this->restoreInstance)) - { - $this->attrInstance->setValue($this->restoreInstance); - unset($this->restoreInstance); - unset($this->attrInstance); - } - } } \ No newline at end of file