From 782d4e124e644009f4f4e29e3392aaf527638faa Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Sat, 30 Jul 2016 12:40:49 +0200 Subject: [PATCH] Destroy Config instance after each test --- classes/Config.php | 5 +++++ tests/VideoDownloadTest.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/classes/Config.php b/classes/Config.php index c7befdf..cc13c3c 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -70,4 +70,9 @@ class Config } return self::$instance; } + + public static function destroyInstance() + { + self::$instance = null; + } } diff --git a/tests/VideoDownloadTest.php b/tests/VideoDownloadTest.php index 4855d74..bfe4e4d 100644 --- a/tests/VideoDownloadTest.php +++ b/tests/VideoDownloadTest.php @@ -32,6 +32,11 @@ class VideoDownloadTest extends \PHPUnit_Framework_TestCase $this->download = new VideoDownload(); } + protected function tearDown() + { + \Alltube\Config::destroyInstance(); + } + /** * Test listExtractors function *