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

feat(tests): improve tests for directives

This commit is contained in:
Awilum
2022-05-22 10:01:15 +03:00
parent 49885646e5
commit 20f056f0ff

View File

@@ -16,4 +16,11 @@ test('constants directive', function () {
$this->assertEquals(ROOT_DIR, entries()->fetch('const-root-dir')['path']);
$this->assertEquals(PATH['project'], entries()->fetch('const-root-dir-2')['path']);
});
test('constants directive disabled', function () {
registry()->set('flextype.settings.entries.directives.constants.enabled', false);
entries()->create('const-root-dir-3', ['path' => '@const[ROOT_DIR]']);
expect(entries()->fetch('const-root-dir-3')['path'])->toBe('@const[ROOT_DIR]');
registry()->set('flextype.settings.entries.directives.constants.enabled', true);
});