mirror of
https://github.com/flextype/flextype.git
synced 2025-08-10 23:24:04 +02:00
Merge branch 'dev' into 563-multistorage-support
This commit is contained in:
@@ -16,13 +16,4 @@ test('test getInstance() method', function () {
|
||||
|
||||
$this->assertInstanceOf(Flextype::class, $firstCall);
|
||||
$this->assertSame($firstCall, $secondCall);
|
||||
});
|
||||
|
||||
test('test container() method', function () {
|
||||
// get container
|
||||
//$this->assertInstanceOf(Entries::class, entries());
|
||||
|
||||
// set container
|
||||
//flextype()->container()()['foo'] = 'bar';
|
||||
//$this->assertEquals('bar', flextype('foo'));
|
||||
});
|
||||
});
|
@@ -24,13 +24,4 @@ test('test getInstance() method', function () {
|
||||
|
||||
$this->assertInstanceOf(Flextype::class, $firstCall);
|
||||
$this->assertSame($firstCall, $secondCall);
|
||||
});
|
||||
|
||||
test('test container() method', function () {
|
||||
// get container
|
||||
// $this->assertInstanceOf(Entries::class, Flextype::getInstance()->container('entries'));
|
||||
|
||||
// set container
|
||||
// Flextype::getInstance()->container()['foo'] = 'bar';
|
||||
//$this->assertEquals('bar', Flextype::getInstance()->container('foo'));
|
||||
});
|
||||
});
|
@@ -14,7 +14,7 @@ beforeEach(function() {
|
||||
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('<?php ');
|
||||
});
|
||||
|
||||
afterEach(function (): void {
|
||||
@@ -22,21 +22,21 @@ afterEach(function (): void {
|
||||
});
|
||||
|
||||
test('test getPluginsList() method', function () {
|
||||
$this->assertTrue(is_array(flextype('plugins')->getPLuginsList()));
|
||||
$this->assertTrue(isset(flextype('plugins')->getPLuginsList()['sandbox']));
|
||||
$this->assertTrue(is_array(plugins()->getPLuginsList()));
|
||||
$this->assertTrue(isset(plugins()->getPLuginsList()['sandbox']));
|
||||
});
|
||||
|
||||
test('test getLocales() method', function () {
|
||||
$this->assertTrue(is_array(flextype('plugins')->getLocales()));
|
||||
$this->assertTrue(isset(flextype('plugins')->getLocales()['en_US']));
|
||||
$this->assertTrue(is_array(plugins()->getLocales()));
|
||||
$this->assertTrue(isset(plugins()->getLocales()['en_US']));
|
||||
});
|
||||
|
||||
test('test getPluginsDictionary() method', function () {
|
||||
$this->assertTrue(is_array(flextype('plugins')->getPluginsDictionary(flextype('plugins')->getPLuginsList(), 'en_US')));
|
||||
$this->assertTrue(isset(flextype('plugins')->getPluginsDictionary(flextype('plugins')->getPLuginsList(), 'en_US')['en_US']['sandbox_title']));
|
||||
$this->assertTrue(is_array(plugins()->getPluginsDictionary(plugins()->getPLuginsList(), 'en_US')));
|
||||
$this->assertTrue(isset(plugins()->getPluginsDictionary(plugins()->getPLuginsList(), 'en_US')['en_US']['sandbox_title']));
|
||||
});
|
||||
|
||||
test('test getPluginsCacheID() method', function () {
|
||||
$md5 = flextype('plugins')->getPluginsCacheID(flextype('plugins')->getPLuginsList());
|
||||
$md5 = plugins()->getPluginsCacheID(plugins()->getPLuginsList());
|
||||
$this->assertTrue(strlen($md5) == 32 && ctype_xdigit($md5));
|
||||
});
|
||||
|
Reference in New Issue
Block a user