1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

feat(tests): trying to fix test for github #477

This commit is contained in:
Awilum
2020-11-03 20:22:36 +03:00
parent cb795da1aa
commit 3df74646bf
3 changed files with 4 additions and 2 deletions

View File

@@ -1,7 +1,5 @@
<?php
use Flextype\Component\Filesystem\Filesystem;
beforeEach(function() {
filesystem()->directory(PATH['project'] . '/entries')->create();
});

View File

@@ -6,6 +6,7 @@ use Flextype\Foundation\Flextype;
use Atomastic\Strings\Strings;
beforeEach(function() {
// Create sandbox plugin
filesystem()->directory(PATH['project'])->create();
filesystem()->directory(PATH['project'] . '/plugins')->create();
@@ -14,6 +15,7 @@ beforeEach(function() {
filesystem()->file(PATH['project'] . '/plugins/sandbox/lang/en_US.yaml')->put('sandbox_title: Sandbox');
filesystem()->file(PATH['project'] . '/plugins/sandbox/settings.yaml')->put('enabled: true');
filesystem()->file(PATH['project'] . '/plugins/sandbox/plugin.yaml')->put('name: Sandbox');
});
afterEach(function (): void {

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace Flextype;
define('FLEXTYPE_MINIMUM_PHP', '7.3.0');
define('ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd()));
define('PATH', [
@@ -13,4 +14,5 @@ define('PATH', [
! is_file($flextype_autoload = ROOT_DIR . '/vendor/autoload.php') and exit('Please run: <i>composer install</i> for flextype');
$flextype_loader = require_once $flextype_autoload;
include ROOT_DIR . '/src/flextype/bootstrap.php';