mirror of
https://github.com/flextype/flextype.git
synced 2025-08-05 04:37:43 +02:00
feat(core): new constants PATH_PROJECT
and PATH_TMP
instead of old constant array PATH
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1304,11 +1304,11 @@
|
||||
|
||||
* **entries**: Added new `move()` method instead of `rename()`
|
||||
|
||||
* **core**: Added new `PATH['tmp']` constant ([#470](https://github.com/flextype/flextype/issues/470))
|
||||
* **core**: Added new `PATH_TMP` constant ([#470](https://github.com/flextype/flextype/issues/470))
|
||||
|
||||
Now we have:
|
||||
|
||||
`PATH['tmp']` constant instead of `PATH['cache']` and `PATH['logs']`
|
||||
`PATH_TMP` constant instead of `PATH['cache']` and `PATH['logs']`
|
||||
|
||||
* **markdown**: Added markdown basic settings ([#471](https://github.com/flextype/flextype/issues/471))
|
||||
|
||||
@@ -1435,7 +1435,7 @@
|
||||
use Flextype\App\Foundation\Entries\Entries;
|
||||
```
|
||||
|
||||
* **core**: use new `PATH['tmp']` constant instead of `PATH['cache']` and `PATH['logs']` ([#470](https://github.com/flextype/flextype/issues/470))
|
||||
* **core**: use new `PATH_TMP` constant instead of `PATH['cache']` and `PATH['logs']` ([#470](https://github.com/flextype/flextype/issues/470))
|
||||
|
||||
* **cache**: old cache config removed, use new config for PhpFastCache ([#457](https://github.com/flextype/flextype/issues/457))
|
||||
|
||||
@@ -1912,7 +1912,7 @@
|
||||
* **entries**: Wildcard * removed from parsers field.
|
||||
* **entries**: Cache setup removed from parsers field.
|
||||
* **settings**: `/project/config/settings.yaml` move to `/project/config/flextype/settings.yaml`
|
||||
* **constants** Removed constant `PATH['config']`, use - `PATH['project'] . '/config/'`
|
||||
* **constants** Removed constant `PATH['config']`, use - `PATH_PROJECT . '/config/'`
|
||||
* **core**: Removed Date Component from the system.
|
||||
* **core**: Removed Text Component from the system.
|
||||
* **cache**: removed methods clear() and clearAll(), use purge() and purgeAll() instead.
|
||||
@@ -2013,7 +2013,7 @@
|
||||
* **core**: new `project` folder instead of `site`
|
||||
|
||||
- rename folder `site` into `project`
|
||||
- use new constant PATH['project'] instead of constant PATH['site']
|
||||
- use new constant PATH_PROJECT instead of constant PATH['site']
|
||||
|
||||
* **core**: removed constants
|
||||
|
||||
|
@@ -29,10 +29,8 @@ define('ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd()));
|
||||
/**
|
||||
* Define the PATH (without trailing slash).
|
||||
*/
|
||||
define('PATH', [
|
||||
'project' => ROOT_DIR . '/project',
|
||||
'tmp' => ROOT_DIR . '/var/tmp',
|
||||
]);
|
||||
define('PATH_PROJECT', ROOT_DIR . '/project');
|
||||
define('PATH_TMP', ROOT_DIR . '/var/tmp');
|
||||
|
||||
/**
|
||||
* Ensure vendor libraries exist
|
||||
|
@@ -33,7 +33,7 @@ class CacheClearCommand extends Command
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$path = PATH['tmp'];
|
||||
$path = PATH_TMP;
|
||||
|
||||
if (filesystem()->directory($path)->exists()) {
|
||||
if (filesystem()->directory($path)->delete()) {
|
||||
|
@@ -33,7 +33,7 @@ class CacheClearConfigCommand extends Command
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
||||
{
|
||||
$configPath = PATH['tmp'] . '/config';
|
||||
$configPath = PATH_TMP . '/config';
|
||||
|
||||
if (filesystem()->directory($configPath)->exists()) {
|
||||
if (filesystem()->directory($configPath)->delete()) {
|
||||
|
@@ -36,7 +36,7 @@ class CacheClearDataCommand extends Command
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$routesData = PATH['tmp'] . '/data';
|
||||
$routesData = PATH_TMP . '/data';
|
||||
|
||||
if (filesystem()->directory($routesData)->exists()) {
|
||||
if (filesystem()->directory($routesData)->delete()) {
|
||||
|
@@ -36,7 +36,7 @@ class CacheClearRoutesCommand extends Command
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$routesPath = PATH['tmp'] . '/routes';
|
||||
$routesPath = PATH_TMP . '/routes';
|
||||
|
||||
if (filesystem()->directory($routesPath)->exists()) {
|
||||
if (filesystem()->directory($routesPath)->delete()) {
|
||||
|
@@ -46,7 +46,7 @@ class Cache extends Api
|
||||
}
|
||||
|
||||
// Clear cache
|
||||
filesystem()->directory(PATH['tmp'])->delete();
|
||||
filesystem()->directory(PATH_TMP)->delete();
|
||||
|
||||
// Return success response
|
||||
return $this->getApiResponse($response, [], 204);
|
||||
|
@@ -76,7 +76,7 @@ class Entries
|
||||
*/
|
||||
public function __construct($options = null, $registry = null)
|
||||
{
|
||||
filesystem()->directory(PATH['project'] . '/' . registry()->get('flextype.settings.entries.directory'))->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/' . registry()->get('flextype.settings.entries.directory'))->ensureExists(0755, true);
|
||||
|
||||
$this->setRegistry($registry);
|
||||
$this->setOptions($options);
|
||||
@@ -498,7 +498,7 @@ class Entries
|
||||
|
||||
$currentEntryID = strings($currenEntry->getPath())
|
||||
->replace('\\', '/')
|
||||
->replace(PATH['project'] . '/' . $this->options['directory'] . '/', '')
|
||||
->replace(PATH_PROJECT . '/' . $this->options['directory'] . '/', '')
|
||||
->trim('/')
|
||||
->toString();
|
||||
|
||||
@@ -893,7 +893,7 @@ class Entries
|
||||
return $this->registry()->get('methods.getFileLocation.result');
|
||||
}
|
||||
|
||||
return PATH['project'] . '/' . $this->options['directory'] . '/' . $this->registry()->get('methods.getFileLocation.params.id') . '/' . $this->registry()->get('methods.getFileLocation.collection.filename') . '.' . $this->registry()->get('methods.getFileLocation.collection.extension');
|
||||
return PATH_PROJECT . '/' . $this->options['directory'] . '/' . $this->registry()->get('methods.getFileLocation.params.id') . '/' . $this->registry()->get('methods.getFileLocation.collection.filename') . '.' . $this->registry()->get('methods.getFileLocation.collection.extension');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -924,7 +924,7 @@ class Entries
|
||||
return $this->registry()->get('methods.getDirectoryLocation.result');
|
||||
}
|
||||
|
||||
return PATH['project'] . '/' . $this->options['directory'] . '/' . $this->registry()->get('methods.getDirectoryLocation.params.id');
|
||||
return PATH_PROJECT . '/' . $this->options['directory'] . '/' . $this->registry()->get('methods.getDirectoryLocation.params.id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -112,14 +112,14 @@ class Plugins
|
||||
foreach ($pluginsList as $plugin) {
|
||||
|
||||
// Set plugin settings directory
|
||||
$projectPluginSettingsDir = PATH['project'] . '/config/plugins/' . $plugin['dirname'];
|
||||
$projectPluginSettingsDir = PATH_PROJECT . '/config/plugins/' . $plugin['dirname'];
|
||||
|
||||
// Set default plugin settings and manifest files
|
||||
$defaultPluginSettingsFile = PATH['project'] . '/plugins/' . $plugin['dirname'] . '/settings.yaml';
|
||||
$defaultPluginManifestFile = PATH['project'] . '/plugins/' . $plugin['dirname'] . '/plugin.yaml';
|
||||
$defaultPluginSettingsFile = PATH_PROJECT . '/plugins/' . $plugin['dirname'] . '/settings.yaml';
|
||||
$defaultPluginManifestFile = PATH_PROJECT . '/plugins/' . $plugin['dirname'] . '/plugin.yaml';
|
||||
|
||||
// Set project plugin settings file
|
||||
$projectPluginSettingsFile = PATH['project'] . '/config/plugins/' . $plugin['dirname'] . '/settings.yaml';
|
||||
$projectPluginSettingsFile = PATH_PROJECT . '/config/plugins/' . $plugin['dirname'] . '/settings.yaml';
|
||||
|
||||
// Create project plugin settings directory
|
||||
! filesystem()->directory($projectPluginSettingsDir)->exists() and filesystem()->directory($projectPluginSettingsDir)->create(0755, true);
|
||||
@@ -207,7 +207,7 @@ class Plugins
|
||||
public function getPluginsDictionary(array $pluginsList, string $locale): array
|
||||
{
|
||||
foreach ($pluginsList as $plugin) {
|
||||
$languageFile = PATH['project'] . '/plugins/' . $plugin['dirname'] . '/lang/' . $locale . '.yaml';
|
||||
$languageFile = PATH_PROJECT . '/plugins/' . $plugin['dirname'] . '/lang/' . $locale . '.yaml';
|
||||
|
||||
if (filesystem()->file($languageFile)->exists()) {
|
||||
if (($content = filesystem()->file($languageFile)->get()) === false) {
|
||||
@@ -244,9 +244,9 @@ class Plugins
|
||||
// Go through...
|
||||
if (is_array($pluginsList) && count($pluginsList) > 0) {
|
||||
foreach ($pluginsList as $plugin) {
|
||||
$defaultPluginSettingsFile = PATH['project'] . '/plugins/' . $plugin['dirname'] . '/settings.yaml';
|
||||
$defaultPluginManifestFile = PATH['project'] . '/plugins/' . $plugin['dirname'] . '/plugin.yaml';
|
||||
$projectPluginSettingsFile = PATH['project'] . '/config/plugins/' . $plugin['dirname'] . '/settings.yaml';
|
||||
$defaultPluginSettingsFile = PATH_PROJECT . '/plugins/' . $plugin['dirname'] . '/settings.yaml';
|
||||
$defaultPluginManifestFile = PATH_PROJECT . '/plugins/' . $plugin['dirname'] . '/plugin.yaml';
|
||||
$projectPluginSettingsFile = PATH_PROJECT . '/config/plugins/' . $plugin['dirname'] . '/settings.yaml';
|
||||
|
||||
$f1 = filesystem()->file($defaultPluginSettingsFile)->exists() ? filemtime($defaultPluginSettingsFile) : '';
|
||||
$f2 = filesystem()->file($defaultPluginManifestFile)->exists() ? filemtime($defaultPluginManifestFile) : '';
|
||||
@@ -257,7 +257,7 @@ class Plugins
|
||||
}
|
||||
|
||||
// Create Unique Cache ID for Plugins
|
||||
return md5('plugins' . PATH['project'] . '/plugins/' . $_pluginsCacheID);
|
||||
return md5('plugins' . PATH_PROJECT . '/plugins/' . $_pluginsCacheID);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -370,12 +370,12 @@ class Plugins
|
||||
// Get Plugins List
|
||||
$pluginsList = [];
|
||||
|
||||
if (filesystem()->directory(PATH['project'] . '/plugins/')->exists()) {
|
||||
foreach (filesystem()->find()->in(PATH['project'] . '/plugins/')->directories()->depth(0) as $plugin) {
|
||||
if (filesystem()->directory(PATH_PROJECT . '/plugins/')->exists()) {
|
||||
foreach (filesystem()->find()->in(PATH_PROJECT . '/plugins/')->directories()->depth(0) as $plugin) {
|
||||
$pluginName = $plugin->getBasename();
|
||||
if (filesystem()->file(PATH['project'] . '/plugins/' . $pluginName . '/plugin.php')->exists() &&
|
||||
filesystem()->file(PATH['project'] . '/plugins/' . $pluginName . '/plugin.yaml')->exists() &&
|
||||
filesystem()->file(PATH['project'] . '/plugins/' . $pluginName . '/settings.yaml')->exists()) {
|
||||
if (filesystem()->file(PATH_PROJECT . '/plugins/' . $pluginName . '/plugin.php')->exists() &&
|
||||
filesystem()->file(PATH_PROJECT . '/plugins/' . $pluginName . '/plugin.yaml')->exists() &&
|
||||
filesystem()->file(PATH_PROJECT . '/plugins/' . $pluginName . '/settings.yaml')->exists()) {
|
||||
$pluginsList[$pluginName]['dirname'] = $plugin->getBasename();
|
||||
$pluginsList[$pluginName]['pathname'] = $plugin->getPathname();
|
||||
}
|
||||
@@ -421,7 +421,7 @@ class Plugins
|
||||
continue;
|
||||
}
|
||||
|
||||
require_once PATH['project'] . '/plugins/' . $pluginName . '/plugin.php';
|
||||
require_once PATH_PROJECT . '/plugins/' . $pluginName . '/plugin.php';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -106,9 +106,9 @@ container()->set('actions', Actions::getInstance());
|
||||
// Init Flextype config (manifest and settings)
|
||||
$flextypeManifestFilePath = ROOT_DIR . '/src/flextype/flextype.yaml';
|
||||
$defaultFlextypeSettingsFilePath = ROOT_DIR . '/src/flextype/settings.yaml';
|
||||
$customFlextypeSettingsFilePath = PATH['project'] . '/config/flextype/settings.yaml';
|
||||
$preflightFlextypePath = PATH['tmp'] . '/config/flextype/';
|
||||
$customFlextypeSettingsPath = PATH['project'] . '/config/flextype/';
|
||||
$customFlextypeSettingsFilePath = PATH_PROJECT . '/config/flextype/settings.yaml';
|
||||
$preflightFlextypePath = PATH_TMP . '/config/flextype/';
|
||||
$customFlextypeSettingsPath = PATH_PROJECT . '/config/flextype/';
|
||||
|
||||
filesystem()->directory($preflightFlextypePath)->ensureExists(0755, true);
|
||||
filesystem()->directory($customFlextypeSettingsPath)->ensureExists(0755, true);
|
||||
@@ -200,8 +200,8 @@ if (registry()->get('flextype.settings.output_buffering')) {
|
||||
|
||||
// Add Router Cache
|
||||
if (registry()->get('flextype.settings.router.cache')) {
|
||||
filesystem()->directory(PATH['tmp'] . '/routes')->ensureExists(0755, true);
|
||||
app()->getRouteCollector()->setCacheFile(PATH['tmp'] . '/routes/routes.php');
|
||||
filesystem()->directory(PATH_TMP . '/routes')->ensureExists(0755, true);
|
||||
app()->getRouteCollector()->setCacheFile(PATH_TMP . '/routes/routes.php');
|
||||
}
|
||||
|
||||
// Add Expression Service
|
||||
@@ -211,7 +211,7 @@ container()->set('expression', new ExpressionLanguage());
|
||||
container()->set('session', new Session());
|
||||
|
||||
// Add Logger Service
|
||||
container()->set('logger', (new Logger('flextype'))->pushHandler(new StreamHandler(PATH['tmp'] . '/logs/' . date('Y-m-d') . '.log')));
|
||||
container()->set('logger', (new Logger('flextype'))->pushHandler(new StreamHandler(PATH_TMP . '/logs/' . date('Y-m-d') . '.log')));
|
||||
|
||||
// Add Emitter Service
|
||||
container()->set('emitter', new Emitter());
|
||||
@@ -238,7 +238,7 @@ container()->set('cache', static function () {
|
||||
|
||||
foreach (registry()->get('flextype.settings.cache.drivers.' . $driverName) as $key => $value) {
|
||||
if ($key === 'path' && in_array($driverName, ['files', 'sqlite', 'leveldb', 'phparray'])) {
|
||||
$config['path'] = ! empty($value) ? PATH['tmp'] . '/' . $value : sys_get_temp_dir();
|
||||
$config['path'] = ! empty($value) ? PATH_TMP . '/' . $value : sys_get_temp_dir();
|
||||
} else {
|
||||
$config[strings($key)->camel()->toString()] = $value;
|
||||
}
|
||||
@@ -373,7 +373,7 @@ if (in_array(registry()->get('flextype.settings.timezone'), DateTimeZone::listId
|
||||
}
|
||||
|
||||
// Set View
|
||||
View::setDirectory(PATH['project']);
|
||||
View::setDirectory(PATH_PROJECT);
|
||||
View::setExtension(registry()->get('flextype.settings.view.extension'));
|
||||
|
||||
// Add Plugins Service
|
||||
|
@@ -18,7 +18,7 @@ if (! function_exists('upload')) {
|
||||
{
|
||||
$settings = registry()->get('flextype.settings.upload');
|
||||
|
||||
$uploadFolder = strings(PATH['project'] . '/' . $settings['directory'] . '/' . $folder . '/')->reduceSlashes()->toString();
|
||||
$uploadFolder = strings(PATH_PROJECT . '/' . $settings['directory'] . '/' . $folder . '/')->reduceSlashes()->toString();
|
||||
|
||||
filesystem()->directory($uploadFolder)->ensureExists(0755, true);
|
||||
|
||||
|
@@ -9,6 +9,6 @@ require_once __DIR__ . '/endpoints/entries.php';
|
||||
require_once __DIR__ . '/endpoints/registry.php';
|
||||
|
||||
// Add project routes
|
||||
if (filesystem()->file(PATH['project'] . '/routes/routes.php')->exists()) {
|
||||
require_once PATH['project'] . '/routes/routes.php';
|
||||
if (filesystem()->file(PATH_PROJECT . '/routes/routes.php')->exists()) {
|
||||
require_once PATH_PROJECT . '/routes/routes.php';
|
||||
}
|
@@ -13,7 +13,7 @@ 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;
|
||||
|
||||
filesystem()->directory(PATH['tmp'])->exists() and filesystem()->directory(PATH['tmp'])->delete();
|
||||
filesystem()->directory(PATH_TMP)->exists() and filesystem()->directory(PATH_TMP)->delete();
|
||||
filesystem()->directory(ROOT_DIR . '/project/config/flextype/')->ensureExists(0755, true);
|
||||
filesystem()->file(ROOT_DIR . '/tests/fixtures/settings/settings.yaml')->copy(ROOT_DIR . '/project/config/flextype/settings.yaml');
|
||||
|
||||
|
@@ -20,11 +20,11 @@ use Cocur\Slugify\Slugify;
|
||||
use Glowy\Arrays\Arrays;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('flextype helper', function () {
|
||||
@@ -100,10 +100,10 @@ test('slugify helper', function () {
|
||||
|
||||
test('find helper', function () {
|
||||
entries()->create('foo', []);
|
||||
$this->assertTrue(find(PATH['project'] . '/entries')->hasResults());
|
||||
$this->assertTrue(find(PATH['project'] . '/entries', [])->hasResults());
|
||||
$this->assertTrue(find(PATH['project'] . '/entries', [], 'files')->hasResults());
|
||||
$this->assertTrue(find(PATH['project'], [], 'directories')->hasResults());
|
||||
$this->assertTrue(find(PATH_PROJECT . '/entries')->hasResults());
|
||||
$this->assertTrue(find(PATH_PROJECT . '/entries', [])->hasResults());
|
||||
$this->assertTrue(find(PATH_PROJECT . '/entries', [], 'files')->hasResults());
|
||||
$this->assertTrue(find(PATH_PROJECT, [], 'directories')->hasResults());
|
||||
});
|
||||
|
||||
test('generateToken helper', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('expressions directive', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('markdown directive', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('php directive', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('shortcodes directive', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('textile directive', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('types directive', function () {
|
||||
|
@@ -4,11 +4,11 @@ use Glowy\Arrays\Arrays;
|
||||
use Flextype\Entries\Entries;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('entry construct', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('actions expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('collection expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('const expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('strings expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('entries expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('field expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('filesystem expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('i18n expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('parsers expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('registry expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('serializers expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('slugify expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('strings expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('var expression', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('CreatedAtField', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('CreatedByField', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('IdField', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('ModifiedAtField', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('PublishedAtField', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('PublishedByField', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('RoutableField', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('SlugField', function () {
|
||||
|
@@ -5,11 +5,11 @@ use Flextype\Component\Filesystem\Filesystem;
|
||||
use Respect\Validation\Validator as v;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('UuidField', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('VisibilityField', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('EntriesMacros for blog', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('PhpMacros', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
use Flextype\Component\Filesystem\Filesystem;
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->create();
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('RegistryMacros', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('calc shortcode', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('const shortcode', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('entries shortcode', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('eval shortcode', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('field shortcode', function () {
|
||||
|
@@ -3,14 +3,14 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
|
||||
$this->tempDir = __DIR__ . '/tmp-foo';
|
||||
@mkdir($this->tempDir);
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
$filesystem = filesystem();
|
||||
$filesystem->directory($this->tempDir)->delete();
|
||||
unset($this->tempDir);
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('markdown shortcode', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('php shortcode', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('raw shortcode', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('textile shortcode', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('type shortcode', function () {
|
||||
|
@@ -3,11 +3,11 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
beforeEach(function() {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->ensureExists(0755, true);
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->ensureExists(0755, true);
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
filesystem()->directory(PATH['project'] . '/entries')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/entries')->delete();
|
||||
});
|
||||
|
||||
test('var shortcode', function () {
|
||||
|
@@ -7,18 +7,18 @@ use Glowy\Strings\Strings;
|
||||
|
||||
beforeEach(function() {
|
||||
// Create sandbox plugin
|
||||
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');
|
||||
filesystem()->file(PATH['project'] . '/plugins/sandbox/settings.yaml')->put('enabled: true');
|
||||
filesystem()->file(PATH['project'] . '/plugins/sandbox/plugin.yaml')->put('name: Sandbox');
|
||||
filesystem()->file(PATH['project'] . '/plugins/sandbox/plugin.php')->put('<?php ');
|
||||
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');
|
||||
filesystem()->file(PATH_PROJECT . '/plugins/sandbox/settings.yaml')->put('enabled: true');
|
||||
filesystem()->file(PATH_PROJECT . '/plugins/sandbox/plugin.yaml')->put('name: Sandbox');
|
||||
filesystem()->file(PATH_PROJECT . '/plugins/sandbox/plugin.php')->put('<?php ');
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
filesystem()->directory(PATH['project'] . '/plugins/sandbox')->delete();
|
||||
filesystem()->directory(PATH_PROJECT . '/plugins/sandbox')->delete();
|
||||
});
|
||||
|
||||
test('get plugins list', function () {
|
||||
|
Reference in New Issue
Block a user