mirror of
https://github.com/flextype/flextype.git
synced 2025-08-08 14:16:46 +02:00
feat(tests): add tests for Plugins #477
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Flextype\Foundation\Flextype;
|
||||
use Atomastic\Strings\Strings;
|
||||
|
||||
beforeEach(function() {
|
||||
//filesystem()->directory(PATH['project'] . '/entries')->create();
|
||||
|
||||
// Create sandbox plugin
|
||||
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('title: Sandbox');
|
||||
filesystem()->file(PATH['project'] . '/plugins/sandbox/settings.yaml')->put('enabled: true');
|
||||
filesystem()->file(PATH['project'] . '/plugins/sandbox/plugin.yaml')->put('name: Sandbox');
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
//filesystem()->directory(PATH['project'] . '/plugins/sandbox')->delete();
|
||||
});
|
||||
|
||||
test('test getPluginsList() method', function () {
|
||||
$this->assertTrue(is_array(flextype('plugins')->getPLuginsList()));
|
||||
$this->assertTrue(isset(flextype('plugins')->getPLuginsList()['sandbox']));
|
||||
});
|
||||
|
Reference in New Issue
Block a user