From 75279fecbf857a9762cf37b887b97d4df4eb5aa3 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 9 Aug 2021 18:24:10 +0300 Subject: [PATCH] feat(tests): use ensureExists instead of create for plugins and content tests --- tests/src/flextype/Content/ContentTest.php | 2 +- tests/src/flextype/PluginsTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/src/flextype/Content/ContentTest.php b/tests/src/flextype/Content/ContentTest.php index 712fed1e..5473cbb5 100644 --- a/tests/src/flextype/Content/ContentTest.php +++ b/tests/src/flextype/Content/ContentTest.php @@ -1,7 +1,7 @@ directory(PATH['project'] . '/entries/content')->create(0755, true); + filesystem()->directory(PATH['project'] . '/entries/content')->ensureExists(0755, true); }); afterEach(function (): void { diff --git a/tests/src/flextype/PluginsTest.php b/tests/src/flextype/PluginsTest.php index a7df6b4e..d3c0bcf1 100644 --- a/tests/src/flextype/PluginsTest.php +++ b/tests/src/flextype/PluginsTest.php @@ -7,8 +7,8 @@ use Atomastic\Strings\Strings; beforeEach(function() { // Create sandbox plugin - @filesystem()->directory(PATH['project'])->create(); - @filesystem()->directory(PATH['project'] . '/plugins')->create(); + filesystem()->directory(PATH['project'])->ensureExists(0755, true); + filesystem()->directory(PATH['project'] . '/plugins')->ensureExists(0755, true); filesystem()->directory(PATH['project'] . '/plugins/sandbox')->create(0755, true); filesystem()->directory(PATH['project'] . '/plugins/sandbox/lang/')->create(0755, true); filesystem()->file(PATH['project'] . '/plugins/sandbox/lang/en_US.yaml')->put('sandbox_title: Sandbox');