diff --git a/CHANGELOG.md b/CHANGELOG.md index 59961539..2c1a84eb 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,7 +67,7 @@ * **core** Added `Thermage` library for better Flextype CLI Application styling. -* **core** Added new core constants: `PROJECT_NAME`, `PATH_PROJECT`, `PATH_TMP`. +* **core** Added new core constants: `FLEXTYPE_PROJECT_NAME`, `FLEXTYPE_PATH_PROJECT`, `FLEXTYPE_PATH_TMP`. * **core** Added ability to run Flextype in silent mode by disabling `app` and `cli`. @@ -737,7 +737,7 @@ * **media** Media and Glide functionality removed from the flextype core due to security and perfomance reasons. Recomended to use imagekit or imgix instead. -* **core** Use new constant `PATH_PROJECT` instead of `PATH['project']` and `PATH_TMP` instead of `PATH['tmp']`. +* **core** Use new constant `FLEXTYPE_PATH_PROJECT` instead of `PATH['project']` and `FLEXTYPE_PATH_TMP` instead of `PATH['tmp']`. * **shortcodes** New default shortcodes syntax and signatures changes for all shortocodes. ```yaml diff --git a/bin/flextype b/bin/flextype index 1e8fc8d2..5ca6f0f8 100755 --- a/bin/flextype +++ b/bin/flextype @@ -18,7 +18,7 @@ namespace Flextype; /** * Define the Flextype start time in current unix timestamp (microseconds). */ -define('START_TIME', microtime(true)); +define('FLEXTYPE_START_TIME', microtime(true)); /** * Define the PATH to the root directory (without trailing slash). diff --git a/src/flextype/bootstrap/after-plugins.php b/src/flextype/bootstrap/after-plugins.php index 0f5fb6c4..ffbd0adc 100644 --- a/src/flextype/bootstrap/after-plugins.php +++ b/src/flextype/bootstrap/after-plugins.php @@ -2,6 +2,6 @@ declare(strict_types=1); -if (filesystem()->file(PATH_PROJECT . '/bootstrap/after-plugins.php')->exists()) { - require_once PATH_PROJECT . '/bootstrap/after-plugins.php'; +if (filesystem()->file(FLEXTYPE_PATH_PROJECT . '/bootstrap/after-plugins.php')->exists()) { + require_once FLEXTYPE_PATH_PROJECT . '/bootstrap/after-plugins.php'; } \ No newline at end of file diff --git a/src/flextype/bootstrap/before-plugins.php b/src/flextype/bootstrap/before-plugins.php index 1a75c863..e387b33c 100644 --- a/src/flextype/bootstrap/before-plugins.php +++ b/src/flextype/bootstrap/before-plugins.php @@ -2,6 +2,6 @@ declare(strict_types=1); -if (filesystem()->file(PATH_PROJECT . '/bootstrap/before-plugins.php')->exists()) { - require_once PATH_PROJECT . '/bootstrap/before-plugins.php'; +if (filesystem()->file(FLEXTYPE_PATH_PROJECT . '/bootstrap/before-plugins.php')->exists()) { + require_once FLEXTYPE_PATH_PROJECT . '/bootstrap/before-plugins.php'; } \ No newline at end of file diff --git a/src/flextype/core/Console/Commands/AboutCommand.php b/src/flextype/core/Console/Commands/AboutCommand.php index 552abc0b..7cd44c95 100644 --- a/src/flextype/core/Console/Commands/AboutCommand.php +++ b/src/flextype/core/Console/Commands/AboutCommand.php @@ -51,10 +51,10 @@ class AboutCommand extends Command div('[b][color=success]Enabled[/color][/b]: ' . implode(', ', array_keys(registry()->get('plugins'))), '') . hr('[b]Constants[/b]', 'my-1') . - div('[b][color=success]PROJECT_NAME[/color][/b]: ' . PROJECT_NAME, '') . + div('[b][color=success]FLEXTYPE_PROJECT_NAME[/color][/b]: ' . FLEXTYPE_PROJECT_NAME, '') . div('[b][color=success]ROOT_DIR[/color][/b]: ' . ROOT_DIR, '') . - div('[b][color=success]PATH_PROJECT[/color][/b]: ' . PATH_PROJECT, '') . - div('[b][color=success]PATH_TMP[/color][/b]: ' . PATH_TMP, '') . + div('[b][color=success]FLEXTYPE_PATH_PROJECT[/color][/b]: ' . FLEXTYPE_PATH_PROJECT, '') . + div('[b][color=success]FLEXTYPE_PATH_TMP[/color][/b]: ' . FLEXTYPE_PATH_TMP, '') . div('[b][color=success]FLEXTYPE_MINIMUM_PHP[/color][/b]: ' . FLEXTYPE_MINIMUM_PHP, '') . hr('[b]PHP Information[/b]', 'my-1') . diff --git a/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php b/src/flextype/core/Console/Commands/Cache/CacheClearCommand.php index eee58757..3431e5c9 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 = FLEXTYPE_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 48527457..6ee21790 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 = FLEXTYPE_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 cc7d225e..fbd6dfee 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 = FLEXTYPE_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 e35cd594..29edcdf7 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 = FLEXTYPE_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 4927b846..a6e2cbff 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(FLEXTYPE_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 1d265b39..4f8faecb 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(FLEXTYPE_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(FLEXTYPE_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 FLEXTYPE_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 FLEXTYPE_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 3f0a5c86..2d91d4ca 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 = FLEXTYPE_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 = FLEXTYPE_PATH_PROJECT . '/plugins/' . $plugin['dirname'] . '/settings.yaml'; + $defaultPluginManifestFile = FLEXTYPE_PATH_PROJECT . '/plugins/' . $plugin['dirname'] . '/plugin.yaml'; // Set project plugin settings file - $projectPluginSettingsFile = PATH_PROJECT . '/config/plugins/' . $plugin['dirname'] . '/settings.yaml'; + $projectPluginSettingsFile = FLEXTYPE_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 = FLEXTYPE_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 = FLEXTYPE_PATH_PROJECT . '/plugins/' . $plugin['dirname'] . '/settings.yaml'; + $defaultPluginManifestFile = FLEXTYPE_PATH_PROJECT . '/plugins/' . $plugin['dirname'] . '/plugin.yaml'; + $projectPluginSettingsFile = FLEXTYPE_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' . FLEXTYPE_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(FLEXTYPE_PATH_PROJECT . '/plugins/')->exists()) { + foreach (filesystem()->find()->in(FLEXTYPE_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(FLEXTYPE_PATH_PROJECT . '/plugins/' . $pluginName . '/plugin.php')->exists() && + filesystem()->file(FLEXTYPE_PATH_PROJECT . '/plugins/' . $pluginName . '/plugin.yaml')->exists() && + filesystem()->file(FLEXTYPE_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 FLEXTYPE_PATH_PROJECT . '/plugins/' . $pluginName . '/plugin.php'; } } } diff --git a/src/flextype/defines.php b/src/flextype/defines.php index 19dbff50..e41f8d88 100644 --- a/src/flextype/defines.php +++ b/src/flextype/defines.php @@ -23,23 +23,23 @@ if (! defined('FLEXTYPE_MINIMUM_PHP')) { define('FLEXTYPE_MINIMUM_PHP', '7.4.0'); } -if (! defined('PROJECT_NAME')) { +if (! defined('FLEXTYPE_PROJECT_NAME')) { /** * Define the project name. */ - define('PROJECT_NAME', 'project'); + define('FLEXTYPE_PROJECT_NAME', 'project'); } -if (! defined('PATH_PROJECT')) { +if (! defined('FLEXTYPE_PATH_PROJECT')) { /** * Define the project path (without trailing slash). */ - define('PATH_PROJECT', ROOT_DIR . '/' . PROJECT_NAME); + define('FLEXTYPE_PATH_PROJECT', ROOT_DIR . '/' . FLEXTYPE_PROJECT_NAME); } -if (! defined('PATH_TMP')) { +if (! defined('FLEXTYPE_PATH_TMP')) { /** * Define the project tmp path (without trailing slash). */ - define('PATH_TMP', ROOT_DIR . '/var/tmp'); + define('FLEXTYPE_PATH_TMP', ROOT_DIR . '/var/tmp'); } \ No newline at end of file diff --git a/src/flextype/flextype.php b/src/flextype/flextype.php index ffee911c..1002f0ab 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 = FLEXTYPE_PATH_PROJECT . '/config/flextype/settings.yaml'; +$preflightFlextypePath = FLEXTYPE_PATH_TMP . '/config/flextype/'; +$customFlextypeSettingsPath = FLEXTYPE_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.enabled')) { - filesystem()->directory(PATH_TMP . '/routes')->ensureExists(0755, true); - app()->getRouteCollector()->setCacheFile(PATH_TMP . '/routes/routes.php'); + filesystem()->directory(FLEXTYPE_PATH_TMP . '/routes')->ensureExists(0755, true); + app()->getRouteCollector()->setCacheFile(FLEXTYPE_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(FLEXTYPE_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) ? FLEXTYPE_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(FLEXTYPE_PATH_PROJECT); View::setExtension(registry()->get('flextype.settings.view.extension')); // Add bootstrap file before plugins intialization. diff --git a/src/flextype/helpers/upload.php b/src/flextype/helpers/upload.php index 19209762..c2db8ef3 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(FLEXTYPE_PATH_PROJECT . '/' . $settings['directory'] . '/' . $folder . '/')->reduceSlashes()->toString(); filesystem()->directory($uploadFolder)->ensureExists(0755, true); diff --git a/src/flextype/helpers/url.php b/src/flextype/helpers/url.php index 40d5d1d8..94cbe1d6 100644 --- a/src/flextype/helpers/url.php +++ b/src/flextype/helpers/url.php @@ -203,7 +203,7 @@ if (! function_exists('getProjectUrl')) { { $url = getBaseUrl(); $url .= '/'; - $url .= PROJECT_NAME; + $url .= FLEXTYPE_PROJECT_NAME; return $url; } diff --git a/src/flextype/routes/routes.php b/src/flextype/routes/routes.php index 906c6917..7cadd2d2 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(FLEXTYPE_PATH_PROJECT . '/routes/routes.php')->exists()) { + require_once FLEXTYPE_PATH_PROJECT . '/routes/routes.php'; } \ No newline at end of file diff --git a/tests/Pest.php b/tests/Pest.php index f789cbae..df5ec0b4 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -9,19 +9,19 @@ define('ROOT_DIR', str_replace(DIRECTORY_SEPARATOR, '/', getcwd())); /** * Define the project name. */ -define('PROJECT_NAME', 'project'); +define('FLEXTYPE_PROJECT_NAME', 'project'); /** * Define the PATH (without trailing slash). */ -define('PATH_PROJECT', ROOT_DIR . '/' . PROJECT_NAME); -define('PATH_TMP', ROOT_DIR . '/var/tmp'); +define('FLEXTYPE_PATH_PROJECT', ROOT_DIR . '/' . FLEXTYPE_PROJECT_NAME); +define('FLEXTYPE_PATH_TMP', ROOT_DIR . '/var/tmp'); ! 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(FLEXTYPE_PATH_TMP)->exists() and filesystem()->directory(FLEXTYPE_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 668c4f68..85576a28 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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(FLEXTYPE_PATH_PROJECT . '/entries')->hasResults()); + $this->assertTrue(find(FLEXTYPE_PATH_PROJECT . '/entries', [])->hasResults()); + $this->assertTrue(find(FLEXTYPE_PATH_PROJECT . '/entries', [], 'files')->hasResults()); + $this->assertTrue(find(FLEXTYPE_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 446f1a2d..64b6679a 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 5cbe294a..4546a5d9 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 fd52ab89..76f18f5b 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 8378ef4e..370904d9 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 305e59e7..865341ce 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 cc4c6601..2c16dbe3 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 d0f736c8..52843160 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 db24732c..98f018a8 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 dd590b64..2c916312 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 ed4a9340..1b2d8eeb 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 5d666d2b..ef4e82e2 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 8ea9be2b..c2a558c3 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 bb0fb218..467cd628 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 67a856a2..2ea02dc3 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 32b4adc5..c1c3cd7a 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 cf9c7791..14eecbc4 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 43f70e6b..ed4a9b70 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 f4e7138d..f1668136 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 edfe53fc..a77caaff 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 444b0f5c..1f9a4f36 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 b72f1e72..fa54b9f2 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 34a30a49..64c1d620 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 69c80fbf..fa81c190 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 4d38046a..1b8b0be9 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 d18d4f10..d06328b9 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 ced225c1..19206c74 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 68de4395..60e47c94 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 84dc3ec4..f721a5b6 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 978cf878..87d5dc48 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 9f509fbd..608ca318 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 2401f0e5..36a19cbe 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 fe0b6f7e..1cb4d7b6 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 50c775aa..d141dbb4 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 c1c84101..40bf9d6a 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(FLEXTYPE_PATH_PROJECT . '/entries')->create(); }); afterEach(function (): void { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 4d558157..8e748620 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 441bf915..4dc06735 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 2bf1988a..e2017790 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 9b7cd754..7737ca5c 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 7749b398..502cd872 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 ed7ac6b3..a0bfb153 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(FLEXTYPE_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(FLEXTYPE_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 a5c1839a..9b4b984e 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 9e3f182b..fcb75227 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 8aeee112..8a0f5f36 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 f88082c3..f6e8e558 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 0154deea..3d315397 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 4803e854..e60da764 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(FLEXTYPE_PATH_PROJECT . '/entries')->ensureExists(0755, true); }); afterEach(function () { - filesystem()->directory(PATH_PROJECT . '/entries')->delete(); + filesystem()->directory(FLEXTYPE_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 b02291bb..0260972d 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(FLEXTYPE_PATH_PROJECT)->ensureExists(0755, true); + filesystem()->directory(FLEXTYPE_PATH_PROJECT . '/plugins')->ensureExists(0755, true); + filesystem()->directory(FLEXTYPE_PATH_PROJECT . '/plugins/sandbox')->create(0755, true); + filesystem()->directory(FLEXTYPE_PATH_PROJECT . '/plugins/sandbox/lang/')->create(0755, true); + filesystem()->file(FLEXTYPE_PATH_PROJECT . '/plugins/sandbox/lang/en_US.yaml')->put('sandbox_title: Sandbox'); + filesystem()->file(FLEXTYPE_PATH_PROJECT . '/plugins/sandbox/settings.yaml')->put('enabled: true'); + filesystem()->file(FLEXTYPE_PATH_PROJECT . '/plugins/sandbox/plugin.yaml')->put('name: Sandbox'); + filesystem()->file(FLEXTYPE_PATH_PROJECT . '/plugins/sandbox/plugin.php')->put('directory(PATH_PROJECT . '/plugins/sandbox')->delete(); + filesystem()->directory(FLEXTYPE_PATH_PROJECT . '/plugins/sandbox')->delete(); }); test('get plugins list', function () {