moved tearDown method to PMATestCase

Signed-off-by: osaid <osaid.nasir@gmail.com>
This commit is contained in:
osaid 2017-01-08 13:03:28 +05:30
parent 01b3509d94
commit fd6a02b215
2 changed files with 14 additions and 14 deletions

View File

@ -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);
}
}
}

View File

@ -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);
}
}
}