diff --git a/tests/ApplicationTest.php b/tests/ApplicationTest.php index b2b491b..2892a8a 100644 --- a/tests/ApplicationTest.php +++ b/tests/ApplicationTest.php @@ -30,8 +30,13 @@ public function setUp(): void public function tearDown(): void { - unlink(static::$in); - unlink(static::$ou); + // Make sure we clean up after ourselves: + if (file_exists(static::$in)) { + unlink(static::$in); + } + if (file_exists(static::$ou)) { + unlink(static::$ou); + } } public function test_new() diff --git a/tests/CliTestCase.php b/tests/CliTestCase.php index 5396374..6554dad 100644 --- a/tests/CliTestCase.php +++ b/tests/CliTestCase.php @@ -46,7 +46,10 @@ public function tearDown(): void public static function tearDownAfterClass(): void { - unlink(static::$ou); + // Make sure we clean up after ourselves: + if (file_exists(static::$ou)) { + unlink(static::$ou); + } } public function buffer() diff --git a/tests/Helper/OutputHelperTest.php b/tests/Helper/OutputHelperTest.php index 7a0e763..c3987f7 100644 --- a/tests/Helper/OutputHelperTest.php +++ b/tests/Helper/OutputHelperTest.php @@ -34,7 +34,10 @@ public function setUp(): void public static function tearDownAfterClass(): void { - unlink(static::$ou); + // Make sure we clean up after ourselves: + if (file_exists(static::$ou)) { + unlink(static::$ou); + } } public function test_show_arguments() diff --git a/tests/IO/InteractorTest.php b/tests/IO/InteractorTest.php index c4552f1..0be146c 100644 --- a/tests/IO/InteractorTest.php +++ b/tests/IO/InteractorTest.php @@ -30,8 +30,13 @@ public function setUp(): void public function tearDown(): void { - unlink(static::$in); - unlink(static::$ou); + // Make sure we clean up after ourselves: + if (file_exists(static::$in)) { + unlink(static::$in); + } + if (file_exists(static::$ou)) { + unlink(static::$ou); + } } public function test_components() diff --git a/tests/Input/ReaderTest.php b/tests/Input/ReaderTest.php index 73947e4..a939136 100644 --- a/tests/Input/ReaderTest.php +++ b/tests/Input/ReaderTest.php @@ -26,7 +26,10 @@ public function setUp(): void public static function tearDownAfterClass(): void { - unlink(static::$in); + // Make sure we clean up after ourselves: + if (file_exists(static::$in)) { + unlink(static::$in); + } } public function test_default()