1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-07 21:56:33 +02:00

feat(tests): use ensureExists instead of create for plugins and content tests

This commit is contained in:
Awilum
2021-08-09 18:24:10 +03:00
parent 2235887c12
commit 75279fecbf
2 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
<?php
beforeEach(function() {
filesystem()->directory(PATH['project'] . '/entries/content')->create(0755, true);
filesystem()->directory(PATH['project'] . '/entries/content')->ensureExists(0755, true);
});
afterEach(function (): void {

View File

@@ -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');