From e19d7a791719250cbbd9f2b47ef370ddb872690f Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Thu, 22 Feb 2018 16:41:00 +0200 Subject: [PATCH] reset logger after unit test moved to `tearDown()` --- tests/TestCase.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index ab805a3..1973667 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -18,15 +18,6 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase public static $params; /** - * Clean up after test case. - */ - public static function tearDownAfterClass() - { - parent::tearDownAfterClass(); - Yii::setLogger(null); - } - - /** * Returns a test configuration param from /data/config.php. * @param string $name params name * @param mixed $default default value to use when param is not set. @@ -49,6 +40,7 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase { parent::tearDown(); $this->destroyApplication(); + Yii::setLogger(null); } /**