From 98912f55a1db861addb6c1ae8bc748384f425b93 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Tue, 16 Jan 2018 18:15:56 +0100 Subject: [PATCH] Fixed issues that came up through Infection --- src/TestCase.php | 4 ++-- tests/TestCaseTest.php | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/TestCase.php b/src/TestCase.php index 0d221c9..82e2782 100644 --- a/src/TestCase.php +++ b/src/TestCase.php @@ -32,7 +32,7 @@ abstract class TestCase extends PHPUnitTestCase */ private $tmpNamespace; - public function setUp() + protected function setUp() { parent::setUp(); @@ -50,7 +50,7 @@ public function setUp() $this->tmpNamespace = uniqid('PACTN'); } - public function tearDown() + protected function tearDown() { parent::tearDown(); $this->rmdir($this->baseTmpDir); diff --git a/tests/TestCaseTest.php b/tests/TestCaseTest.php index 38ff203..6dcf240 100644 --- a/tests/TestCaseTest.php +++ b/tests/TestCaseTest.php @@ -20,6 +20,16 @@ final class TestCaseTest extends TestCase */ private $previousTemporaryDirectory = ''; + protected function setUp() + { + parent::setUp(); + } + + protected function tearDown() + { + parent::tearDown(); + } + public function provideTemporaryDirectory() { for ($i = 0; $i <= self::PENTIUM; $i++) { @@ -107,4 +117,9 @@ public function testAwaitTimeout(LoopInterface $loop = null) $this->await((new Deferred())->promise(), $loop, 0.1); } + + public function testGetSysTempDir() + { + self::assertFileExists($this->getSysTempDir()); + } }