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:
@@ -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);
|
||||
});
|
Reference in New Issue
Block a user