From 644cd067481e967cd22908bef2e4a06903f31177 Mon Sep 17 00:00:00 2001 From: Steve Bauman Date: Mon, 9 Jan 2023 23:26:07 -0500 Subject: [PATCH] Make test compatible with older versions of Laravel --- tests/PurifyTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/PurifyTest.php b/tests/PurifyTest.php index 385b5ef..c17bf5f 100644 --- a/tests/PurifyTest.php +++ b/tests/PurifyTest.php @@ -8,6 +8,7 @@ use Stevebauman\Purify\Definitions\Definition; use Stevebauman\Purify\Facades\Purify; use Stevebauman\Purify\PurifyServiceProvider; +use Symfony\Component\Finder\Finder; class PurifyTest extends TestCase { @@ -140,7 +141,9 @@ public function test_caching_can_be_disabled() Purify::driver()->clean('Test') ); - $this->assertTrue(File::isEmptyDirectory($dir)); + $this->assertFalse( + Finder::create()->in($dir)->depth(0)->hasResults() + ); } }