diff --git a/CHANGELOG.md b/CHANGELOG.md index 39e0a88d..13996cf3 100755 --- a/CHANGELOG.md +++ b/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 diff --git a/index.php b/index.php index 1837a623..efd5a340 100755 --- a/index.php +++ b/index.php @@ -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 diff --git a/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php b/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php index feb2efe5..af2a51ee 100644 --- a/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php +++ b/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php @@ -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()) { diff --git a/src/flextype/core/Console/Commands/Cache/CacheClearConfigCommand.php b/src/flextype/core/Console/Commands/Cache/CacheClearConfigCommand.php index ceaa2668..47ec86f0 100644 --- a/src/flextype/core/Console/Commands/Cache/CacheClearConfigCommand.php +++ b/src/flextype/core/Console/Commands/Cache/CacheClearConfigCommand.php @@ -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()) { diff --git a/src/flextype/core/Console/Commands/Cache/CacheClearDataCommand.php b/src/flextype/core/Console/Commands/Cache/CacheClearDataCommand.php index 480aade7..ebd13c99 100644 --- a/src/flextype/core/Console/Commands/Cache/CacheClearDataCommand.php +++ b/src/flextype/core/Console/Commands/Cache/CacheClearDataCommand.php @@ -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()) { diff --git a/src/flextype/core/Console/Commands/Cache/CacheClearRoutesCommand.php b/src/flextype/core/Console/Commands/Cache/CacheClearRoutesCommand.php index b14188b5..e078d20d 100644 --- a/src/flextype/core/Console/Commands/Cache/CacheClearRoutesCommand.php +++ b/src/flextype/core/Console/Commands/Cache/CacheClearRoutesCommand.php @@ -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()) { diff --git a/src/flextype/core/Endpoints/Cache.php b/src/flextype/core/Endpoints/Cache.php index 374da4a0..4927b846 100644 --- a/src/flextype/core/Endpoints/Cache.php +++ b/src/flextype/core/Endpoints/Cache.php @@ -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); diff --git a/src/flextype/core/Entries/Entries.php b/src/flextype/core/Entries/Entries.php index f4d4165b..bb870ec2 100755 --- a/src/flextype/core/Entries/Entries.php +++ b/src/flextype/core/Entries/Entries.php @@ -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'); } /** diff --git a/src/flextype/core/Plugins.php b/src/flextype/core/Plugins.php index be2c348c..3f0a5c86 100755 --- a/src/flextype/core/Plugins.php +++ b/src/flextype/core/Plugins.php @@ -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'; } } } diff --git a/src/flextype/flextype.php b/src/flextype/flextype.php index 29df0fc0..b881db88 100644 --- a/src/flextype/flextype.php +++ b/src/flextype/flextype.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 diff --git a/src/flextype/helpers/upload.php b/src/flextype/helpers/upload.php index 4a1e88d4..19209762 100644 --- a/src/flextype/helpers/upload.php +++ b/src/flextype/helpers/upload.php @@ -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); diff --git a/src/flextype/routes/routes.php b/src/flextype/routes/routes.php index 979d6d09..906c6917 100644 --- a/src/flextype/routes/routes.php +++ b/src/flextype/routes/routes.php @@ -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'; } \ No newline at end of file diff --git a/tests/Pest.php b/tests/Pest.php index d567c0a4..95410a39 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -13,7 +13,7 @@ define('PATH', [ ! is_file($flextype_autoload = ROOT_DIR . '/vendor/autoload.php') and exit('Please run: composer install 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'); diff --git a/tests/src/flextype/HelpersTest.php b/tests/src/flextype/HelpersTest.php index d72d2009..668c4f68 100644 --- a/tests/src/flextype/HelpersTest.php +++ b/tests/src/flextype/HelpersTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Directives/ExpressionsDirectiveTest.php b/tests/src/flextype/core/Entries/Directives/ExpressionsDirectiveTest.php index 42d84026..446f1a2d 100644 --- a/tests/src/flextype/core/Entries/Directives/ExpressionsDirectiveTest.php +++ b/tests/src/flextype/core/Entries/Directives/ExpressionsDirectiveTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Directives/MarkdownDirectiveTest.php b/tests/src/flextype/core/Entries/Directives/MarkdownDirectiveTest.php index 189d09a5..5cbe294a 100644 --- a/tests/src/flextype/core/Entries/Directives/MarkdownDirectiveTest.php +++ b/tests/src/flextype/core/Entries/Directives/MarkdownDirectiveTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Directives/PhpDirectiveTest.php b/tests/src/flextype/core/Entries/Directives/PhpDirectiveTest.php index 0f542696..fd52ab89 100644 --- a/tests/src/flextype/core/Entries/Directives/PhpDirectiveTest.php +++ b/tests/src/flextype/core/Entries/Directives/PhpDirectiveTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Directives/ShortcodesDirectiveTest.php b/tests/src/flextype/core/Entries/Directives/ShortcodesDirectiveTest.php index 3c227921..8378ef4e 100644 --- a/tests/src/flextype/core/Entries/Directives/ShortcodesDirectiveTest.php +++ b/tests/src/flextype/core/Entries/Directives/ShortcodesDirectiveTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Directives/TextileDirectiveTest.php b/tests/src/flextype/core/Entries/Directives/TextileDirectiveTest.php index 96168426..305e59e7 100644 --- a/tests/src/flextype/core/Entries/Directives/TextileDirectiveTest.php +++ b/tests/src/flextype/core/Entries/Directives/TextileDirectiveTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Directives/TypesDirectiveTest.php b/tests/src/flextype/core/Entries/Directives/TypesDirectiveTest.php index 032014e4..cc4c6601 100644 --- a/tests/src/flextype/core/Entries/Directives/TypesDirectiveTest.php +++ b/tests/src/flextype/core/Entries/Directives/TypesDirectiveTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/EntriesTest.php b/tests/src/flextype/core/Entries/EntriesTest.php index b5ed23b7..d0f736c8 100644 --- a/tests/src/flextype/core/Entries/EntriesTest.php +++ b/tests/src/flextype/core/Entries/EntriesTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/ActionsExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/ActionsExpressionTest.php index 9f82857c..db24732c 100644 --- a/tests/src/flextype/core/Entries/Expressions/ActionsExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/ActionsExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/CollectionExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/CollectionExpressionTest.php index 9f7bd753..dd590b64 100644 --- a/tests/src/flextype/core/Entries/Expressions/CollectionExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/CollectionExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/ConstExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/ConstExpressionTest.php index bcda5e1c..ed4a9340 100644 --- a/tests/src/flextype/core/Entries/Expressions/ConstExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/ConstExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/CsrfExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/CsrfExpressionTest.php index 068d1932..5d666d2b 100644 --- a/tests/src/flextype/core/Entries/Expressions/CsrfExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/CsrfExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/EntriesExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/EntriesExpressionTest.php index 8da80c6c..8ea9be2b 100644 --- a/tests/src/flextype/core/Entries/Expressions/EntriesExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/EntriesExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/FieldExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/FieldExpressionTest.php index 20e884a4..bb0fb218 100644 --- a/tests/src/flextype/core/Entries/Expressions/FieldExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/FieldExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/FilesystemExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/FilesystemExpressionTest.php index 1b947fc7..67a856a2 100644 --- a/tests/src/flextype/core/Entries/Expressions/FilesystemExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/FilesystemExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/I18nExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/I18nExpressionTest.php index 60df1736..32b4adc5 100644 --- a/tests/src/flextype/core/Entries/Expressions/I18nExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/I18nExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/ParsersExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/ParsersExpressionTest.php index c59037ef..cf9c7791 100644 --- a/tests/src/flextype/core/Entries/Expressions/ParsersExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/ParsersExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/RegistryExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/RegistryExpressionTest.php index f43cab33..43f70e6b 100644 --- a/tests/src/flextype/core/Entries/Expressions/RegistryExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/RegistryExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/SerializersExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/SerializersExpressionTest.php index 6c5c2038..f4e7138d 100644 --- a/tests/src/flextype/core/Entries/Expressions/SerializersExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/SerializersExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/SlugifyExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/SlugifyExpressionTest.php index c63e3cc5..edfe53fc 100644 --- a/tests/src/flextype/core/Entries/Expressions/SlugifyExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/SlugifyExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/StringsExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/StringsExpressionTest.php index bda8f1d9..444b0f5c 100644 --- a/tests/src/flextype/core/Entries/Expressions/StringsExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/StringsExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Expressions/VarExpressionTest.php b/tests/src/flextype/core/Entries/Expressions/VarExpressionTest.php index 35a9d276..b72f1e72 100644 --- a/tests/src/flextype/core/Entries/Expressions/VarExpressionTest.php +++ b/tests/src/flextype/core/Entries/Expressions/VarExpressionTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Fields/CreatedAtFieldTest.php b/tests/src/flextype/core/Entries/Fields/CreatedAtFieldTest.php index 50a679a8..34a30a49 100644 --- a/tests/src/flextype/core/Entries/Fields/CreatedAtFieldTest.php +++ b/tests/src/flextype/core/Entries/Fields/CreatedAtFieldTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Fields/CreatedByFieldTest.php b/tests/src/flextype/core/Entries/Fields/CreatedByFieldTest.php index 67afb7ea..69c80fbf 100644 --- a/tests/src/flextype/core/Entries/Fields/CreatedByFieldTest.php +++ b/tests/src/flextype/core/Entries/Fields/CreatedByFieldTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Fields/IdFieldTest.php b/tests/src/flextype/core/Entries/Fields/IdFieldTest.php index 5e96ff68..4d38046a 100644 --- a/tests/src/flextype/core/Entries/Fields/IdFieldTest.php +++ b/tests/src/flextype/core/Entries/Fields/IdFieldTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Fields/ModifiedAtFieldTest.php b/tests/src/flextype/core/Entries/Fields/ModifiedAtFieldTest.php index dd45c2d7..d18d4f10 100644 --- a/tests/src/flextype/core/Entries/Fields/ModifiedAtFieldTest.php +++ b/tests/src/flextype/core/Entries/Fields/ModifiedAtFieldTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Fields/PublishedAtFieldTest.php b/tests/src/flextype/core/Entries/Fields/PublishedAtFieldTest.php index 27628e40..ced225c1 100644 --- a/tests/src/flextype/core/Entries/Fields/PublishedAtFieldTest.php +++ b/tests/src/flextype/core/Entries/Fields/PublishedAtFieldTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Fields/PublishedByFieldTest.php b/tests/src/flextype/core/Entries/Fields/PublishedByFieldTest.php index 3b7ad612..68de4395 100644 --- a/tests/src/flextype/core/Entries/Fields/PublishedByFieldTest.php +++ b/tests/src/flextype/core/Entries/Fields/PublishedByFieldTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Fields/RoutableFieldTest.php b/tests/src/flextype/core/Entries/Fields/RoutableFieldTest.php index 4310508b..84dc3ec4 100644 --- a/tests/src/flextype/core/Entries/Fields/RoutableFieldTest.php +++ b/tests/src/flextype/core/Entries/Fields/RoutableFieldTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Fields/SlugFieldTest.php b/tests/src/flextype/core/Entries/Fields/SlugFieldTest.php index a276c23c..978cf878 100644 --- a/tests/src/flextype/core/Entries/Fields/SlugFieldTest.php +++ b/tests/src/flextype/core/Entries/Fields/SlugFieldTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Fields/UuidFieldTest.php b/tests/src/flextype/core/Entries/Fields/UuidFieldTest.php index 90f24962..9f509fbd 100644 --- a/tests/src/flextype/core/Entries/Fields/UuidFieldTest.php +++ b/tests/src/flextype/core/Entries/Fields/UuidFieldTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Fields/VisibilityFieldTest.php b/tests/src/flextype/core/Entries/Fields/VisibilityFieldTest.php index 2a87b81b..2401f0e5 100644 --- a/tests/src/flextype/core/Entries/Fields/VisibilityFieldTest.php +++ b/tests/src/flextype/core/Entries/Fields/VisibilityFieldTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Macros/EntriesMacrosTest.php b/tests/src/flextype/core/Entries/Macros/EntriesMacrosTest.php index 8acb6ffd..fe0b6f7e 100644 --- a/tests/src/flextype/core/Entries/Macros/EntriesMacrosTest.php +++ b/tests/src/flextype/core/Entries/Macros/EntriesMacrosTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Macros/PhpMacrosTest.php b/tests/src/flextype/core/Entries/Macros/PhpMacrosTest.php index fe19188c..50c775aa 100644 --- a/tests/src/flextype/core/Entries/Macros/PhpMacrosTest.php +++ b/tests/src/flextype/core/Entries/Macros/PhpMacrosTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Entries/Macros/RegistryMacrosTest.php b/tests/src/flextype/core/Entries/Macros/RegistryMacrosTest.php index 35bceafc..c1c84101 100644 --- a/tests/src/flextype/core/Entries/Macros/RegistryMacrosTest.php +++ b/tests/src/flextype/core/Entries/Macros/RegistryMacrosTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/CalcShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/CalcShortcodeTest.php index 7a8e9f9f..4d558157 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/CalcShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/CalcShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/ConstShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/ConstShortcodeTest.php index d062eb9a..441bf915 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/ConstShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/ConstShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/EntriesShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/EntriesShortcodeTest.php index 7ce693dc..2bf1988a 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/EntriesShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/EntriesShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/EvalShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/EvalShortcodeTest.php index 2ac941a7..9b7cd754 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/EvalShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/EvalShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/FieldShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/FieldShortcodeTest.php index 888b266b..7749b398 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/FieldShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/FieldShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/FilesystemShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/FilesystemShortcodeTest.php index 4d570ca0..ed7ac6b3 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/FilesystemShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/FilesystemShortcodeTest.php @@ -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); diff --git a/tests/src/flextype/core/Parsers/Shortcodes/MarkdownShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/MarkdownShortcodeTest.php index 2a02dff5..a5c1839a 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/MarkdownShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/MarkdownShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/PhpShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/PhpShortcodeTest.php index 0d67809a..9e3f182b 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/PhpShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/PhpShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/RawShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/RawShortcodeTest.php index aff1aa01..8aeee112 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/RawShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/RawShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/TextileShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/TextileShortcodeTest.php index f6892b33..f88082c3 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/TextileShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/TextileShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/TypeShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/TypeShortcodeTest.php index 3e5be9f9..0154deea 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/TypeShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/TypeShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/Parsers/Shortcodes/VarShortcodeTest.php b/tests/src/flextype/core/Parsers/Shortcodes/VarShortcodeTest.php index b9c2c22b..4803e854 100644 --- a/tests/src/flextype/core/Parsers/Shortcodes/VarShortcodeTest.php +++ b/tests/src/flextype/core/Parsers/Shortcodes/VarShortcodeTest.php @@ -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 () { diff --git a/tests/src/flextype/core/PluginsTest.php b/tests/src/flextype/core/PluginsTest.php index 9f8b22c5..b02291bb 100644 --- a/tests/src/flextype/core/PluginsTest.php +++ b/tests/src/flextype/core/PluginsTest.php @@ -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('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('directory(PATH['project'] . '/plugins/sandbox')->delete(); + filesystem()->directory(PATH_PROJECT . '/plugins/sandbox')->delete(); }); test('get plugins list', function () {