From 2ebf1f7110117ac33763e6188571201ff48d7480 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Fri, 12 Mar 2021 20:06:00 -0600 Subject: [PATCH 1/8] Removed failing test with no assertions * pluginsTest::testPluginScripts() --- e107_tests/tests/unit/pluginsTest.php | 77 --------------------------- 1 file changed, 77 deletions(-) diff --git a/e107_tests/tests/unit/pluginsTest.php b/e107_tests/tests/unit/pluginsTest.php index a7bbc6f4c..93eb5fd39 100644 --- a/e107_tests/tests/unit/pluginsTest.php +++ b/e107_tests/tests/unit/pluginsTest.php @@ -133,83 +133,6 @@ } - - public function testPluginScripts() - { - - $core = e107::getPlug()->getCorePluginList(); - - $exclude = array( - 'forum/forum_post.php', - 'forum/forum_viewtopic.php', // needs a major cleanup. - 'forum/index.php', - 'online/online_menu.php', // FIXME missing template for member/new - 'pm/pm.php', // FIXME contains exit, needs rework. - 'poll/admin_config.php', // FIXME convert to admin-ui - 'rss_menu/rss.php', // FIXME rework code into class. - 'tagcloud/tagcloud_menu.php', // FIXME - strange (PHP bug?), doesn't see the render() method. - 'tinymce4/wysiwyg.php', // javascript generator. - ); - - //DEBUG A SPECIFIC FILE : dir => file - // $focus = array('tagcloud'=>'tagcloud_menu.php'); - - - foreach($core as $plug) - { - $parm = null; // - e107::plugLan($plug, 'global'); // load global language (usually done in class2.php) - e107::getConfig()->setPref('plug_installed/'.$plug, 1); // simulate installed. - - $path = e_PLUGIN.$plug; - $files = scandir($path); - unset($files[0], $files[1]); // . and .. - - if(!empty($focus) && !isset($focus[$plug])) - { - continue; - } - - foreach($files as $f) - { - $filePath = $path.'/'.$f; - - if(!empty($focus) && $f !== $focus[$plug]) - { - continue; - } - - if(is_dir($filePath) || (strpos($f, '_sql.php') !== false) || strpos($f, '.php') === false || in_array($plug.'/'.$f, $exclude)) - { - continue; - } - - // echo " --- ".$filePath." --- \n"; - if(empty($focus)) - { - ob_start(); - } - require_once( $filePath); - if(empty($focus)) - { - ob_end_clean(); - } - // echo $plug.'/'.$f."\n"; - - } - - } - - - } - - - - - - - - /** * @see https://github.com/e107inc/e107/issues/3547 */ From 99aa39a8e52452ab4e10849c426560ec67959dd7 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Fri, 12 Mar 2021 20:14:29 -0600 Subject: [PATCH 2/8] e107_tests: Removed usages of var_dump() --- e107_tests/tests/unit/e107Test.php | 6 ------ e107_tests/tests/unit/e107_user_extendedTest.php | 1 - e107_tests/tests/unit/e_admin_uiTest.php | 5 ----- e107_tests/tests/unit/e_arrayTest.php | 4 ---- e107_tests/tests/unit/e_db_abstractTest.php | 4 ---- e107_tests/tests/unit/e_mediaTest.php | 3 --- e107_tests/tests/unit/e_menu_layoutTest.php | 2 -- e107_tests/tests/unit/e_parseTest.php | 6 ------ e107_tests/tests/unit/e_themeTest.php | 3 --- e107_tests/tests/unit/pluginsTest.php | 2 -- 10 files changed, 36 deletions(-) diff --git a/e107_tests/tests/unit/e107Test.php b/e107_tests/tests/unit/e107Test.php index b03bff553..cd4814a18 100644 --- a/e107_tests/tests/unit/e107Test.php +++ b/e107_tests/tests/unit/e107Test.php @@ -1357,7 +1357,6 @@ class e107Test extends \Codeception\Test\Unit public function testThemeLan() { $result = e107::themeLan(null, 'basic-light'); - var_dump($result); }*/ /* @@ -1887,9 +1886,6 @@ class e107Test extends \Codeception\Test\Unit // $this->e107->prepare_request(); - // var_dump($_SERVER['QUEST_STRING']); - - // $res = null; // $this->assertTrue($res); } @@ -2009,12 +2005,10 @@ class e107Test extends \Codeception\Test\Unit $result = $obj::isInstalled('user'); - // var_dump($result); $this->assertTrue($result); $result = $obj::isInstalled('news'); - // var_dump($result); $this->assertTrue($result); } diff --git a/e107_tests/tests/unit/e107_user_extendedTest.php b/e107_tests/tests/unit/e107_user_extendedTest.php index 8cb15d789..517bd2fba 100644 --- a/e107_tests/tests/unit/e107_user_extendedTest.php +++ b/e107_tests/tests/unit/e107_user_extendedTest.php @@ -1124,7 +1124,6 @@ { $data = $this->ue->getFields(); $this->assertArrayHasKey('text', $data); - // var_dump($data); // $this->assertCount(15, $data); $data = $this->ue->getFields(16); diff --git a/e107_tests/tests/unit/e_admin_uiTest.php b/e107_tests/tests/unit/e_admin_uiTest.php index 0c2362a7c..3b1befe59 100644 --- a/e107_tests/tests/unit/e_admin_uiTest.php +++ b/e107_tests/tests/unit/e_admin_uiTest.php @@ -25,12 +25,7 @@ { $result = preg_replace('/[^\w\-:.]/', '', $var['text']); // this pattern used in parts of the admin-ui. $this->assertEquals($var['expected'], $result); - //var_dump($result); } - - // echo array_flip(get_defined_constants(true)['pcre'])[preg_last_error()]; - - } diff --git a/e107_tests/tests/unit/e_arrayTest.php b/e107_tests/tests/unit/e_arrayTest.php index 964368edf..d2a03347a 100644 --- a/e107_tests/tests/unit/e_arrayTest.php +++ b/e107_tests/tests/unit/e_arrayTest.php @@ -132,10 +132,6 @@ $data = array ( $input = array('myarray'=>'myvalue'); $result = $this->arrObj->unserialize($input); $this->assertSame($input, $result); - - - // var_dump($actual); - } /* diff --git a/e107_tests/tests/unit/e_db_abstractTest.php b/e107_tests/tests/unit/e_db_abstractTest.php index 3408fc695..0f2251448 100644 --- a/e107_tests/tests/unit/e_db_abstractTest.php +++ b/e107_tests/tests/unit/e_db_abstractTest.php @@ -1010,10 +1010,6 @@ abstract class e_db_abstractTest extends \Codeception\Test\Unit ); $this->assertEquals($expected, $actual); - - - //$actual = $this->db->getFieldDefs('userclass_classes'); - //var_dump($actual); } diff --git a/e107_tests/tests/unit/e_mediaTest.php b/e107_tests/tests/unit/e_mediaTest.php index e5633fbac..cad661cb9 100644 --- a/e107_tests/tests/unit/e_mediaTest.php +++ b/e107_tests/tests/unit/e_mediaTest.php @@ -80,11 +80,8 @@ $json = $this->md->processAjaxImport($file,$var['param']); $result = json_decode($json, JSON_PRETTY_PRINT); - // var_dump($result); $this->assertNotFalse($result); - // var_dump($result); - $this->assertStringEndsWith('/'.basename($var['file']), $result['result']); $this->assertNotEmpty($result['preview']); diff --git a/e107_tests/tests/unit/e_menu_layoutTest.php b/e107_tests/tests/unit/e_menu_layoutTest.php index 9b1dc15c4..bfbed2861 100644 --- a/e107_tests/tests/unit/e_menu_layoutTest.php +++ b/e107_tests/tests/unit/e_menu_layoutTest.php @@ -166,8 +166,6 @@ $expectedLength = $length; $actualLength = strlen($content); - //var_dump($key. " = ".$actualLength); - $this->assertEquals($expectedLength, $actualLength, $key. " is different"); } diff --git a/e107_tests/tests/unit/e_parseTest.php b/e107_tests/tests/unit/e_parseTest.php index 741456990..dee0dde1b 100644 --- a/e107_tests/tests/unit/e_parseTest.php +++ b/e107_tests/tests/unit/e_parseTest.php @@ -1062,8 +1062,6 @@ while($row = $sql->fetch()) $html = "

My paragraph bold

"; $result = $this->tp->htmlwrap($html, 20); - - var_dump($result); }*/ public function testToRss() @@ -1118,7 +1116,6 @@ while($row = $sql->fetch()) if(!empty($errors)) { - var_dump($errors); codecept_debug($errors); } @@ -2201,8 +2198,6 @@ while($row = $sql->fetch()) { $this->assertStringContainsString($str, $result, "Failed on index #".$index); } - //var_dump($result); - } @@ -2233,7 +2228,6 @@ while($row = $sql->fetch()) { $result = $this->tp->toIcon($var['input'],$var['parms']); $this->assertStringContainsString($var['expected'],$result); - //var_dump($result); } } diff --git a/e107_tests/tests/unit/e_themeTest.php b/e107_tests/tests/unit/e_themeTest.php index 7036a1f98..3e0e94b22 100644 --- a/e107_tests/tests/unit/e_themeTest.php +++ b/e107_tests/tests/unit/e_themeTest.php @@ -668,9 +668,6 @@ class e_themeTest extends \Codeception\Test\Unit // { // $res = e_theme::loadLayout('full', 'bootstrap4'); - // var_dump($res); - - // } /* public function testGetThemesMigrations() diff --git a/e107_tests/tests/unit/pluginsTest.php b/e107_tests/tests/unit/pluginsTest.php index 93eb5fd39..37ff33a0d 100644 --- a/e107_tests/tests/unit/pluginsTest.php +++ b/e107_tests/tests/unit/pluginsTest.php @@ -407,8 +407,6 @@ } $this->assertEmpty($result, $folder." > ".$this_addon." returned error #".$result.$errMsg); - // echo $folder; - // var_dump($result); } From c68604b971587738c5171e3015aee1fd8453f067 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Tue, 30 Mar 2021 20:11:59 -0500 Subject: [PATCH 3/8] Don't assume an empty table in e_db_abstractTest::testIsEmpty() --- e107_tests/tests/unit/e_db_abstractTest.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/e107_tests/tests/unit/e_db_abstractTest.php b/e107_tests/tests/unit/e_db_abstractTest.php index 0f2251448..35c8dffb7 100644 --- a/e107_tests/tests/unit/e_db_abstractTest.php +++ b/e107_tests/tests/unit/e_db_abstractTest.php @@ -851,11 +851,17 @@ abstract class e_db_abstractTest extends \Codeception\Test\Unit public function testIsEmpty() { - $result = $this->db->isEmpty('plugin'); + $this->db->copyTable('user', 'test_is_empty', true, true); + + $result = $this->db->isEmpty('test_is_empty'); $this->assertFalse($result); - // $result = $this->db->isEmpty('comments'); - // $this->assertTrue($result); + $this->db->truncate('test_is_empty'); + + $result = $this->db->isEmpty('test_is_empty'); + $this->assertTrue($result); + + $this->db->dropTable('test_is_empty'); $result = $this->db->isEmpty(); $this->assertFalse($result); From e261e4fb2db388f6558793234594baad711ce1b6 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Tue, 30 Mar 2021 23:53:19 -0500 Subject: [PATCH 4/8] Fix undefined constants when e107Test::testGetCoreTemplate() runs first --------- 1) e_navigationTest: Admin links plugins Test tests/unit/e_navigationTest.php:testAdminLinksPlugins Error: ;1m [Error] Undefined constant "E_16_PLUGMANAGER" #1 /__w/e107/e107/e107_handlers/sitelinks_class.php:882 #2 /__w/e107/e107/e107_tests/tests/unit/e_navigationTest.php:528 --------- 2) e_navigationTest: Admin links legacy Test tests/unit/e_navigationTest.php:testAdminLinksLegacy Error: ;1m [Error] Undefined constant "E_32_MAIN" #1 /__w/e107/e107/e107_handlers/sitelinks_class.php:735 #2 /__w/e107/e107/e107_handlers/sitelinks_class.php:887 #3 /__w/e107/e107/e107_tests/tests/unit/e_navigationTest.php:374 --------- 3) e_formTest: Render value Test tests/unit/e_formTest.php:testRenderValue Error: ;1m [Error] Undefined constant "ADMIN_TRUE_ICON" #1 /__w/e107/e107/e107_tests/tests/unit/e_formTest.php:943 --------- 4) scriptsTest: Admin scripts Test tests/unit/scriptsTest.php:testAdminScripts Error: ;1m [Error] Undefined constant "E_32_MAIN" #1 /__w/e107/e107/e107_handlers/sitelinks_class.php:735 #2 /__w/e107/e107/e107_handlers/sitelinks_class.php:887 #3 /__w/e107/e107/e107_admin/includes/infopanel.php:110 #4 /__w/e107/e107/e107_admin/includes/flexpanel.php:66 #5 /__w/e107/e107/e107_admin/admin.php:63 #6 /__w/e107/e107/e107_tests/tests/unit/scriptsTest.php:140 #7 /__w/e107/e107/e107_tests/tests/unit/scriptsTest.php:27 --------- 5) e_formTest: Render value inline Test tests/unit/e_formTest.php:testRenderValueInline Error: ;1m [Error] Undefined constant "ADMIN_FALSE_ICON" #1 /__w/e107/e107/e107_handlers/form_handler.php:5829 #2 /__w/e107/e107/e107_tests/tests/unit/e_formTest.php:1029 --------- 6) e_navigationTest: Admin links sub Test tests/unit/e_navigationTest.php:testAdminLinksSub Error: ;1m [Error] Undefined constant "E_32_MAIN" #1 /__w/e107/e107/e107_handlers/sitelinks_class.php:735 #2 /__w/e107/e107/e107_handlers/sitelinks_class.php:887 #3 /__w/e107/e107/e107_tests/tests/unit/e_navigationTest.php:418 --------- 7) e_parse_shortcodeTest: Admin shortcodes Test tests/unit/e_parse_shortcodeTest.php:testAdminShortcodes Error: ;1m [Error] Undefined constant "E_16_NEWS" #1 /__w/e107/e107/e107_core/shortcodes/batch/admin_shortcodes.php:518 #2 /__w/e107/e107/e107_core/shortcodes/batch/admin_shortcodes.php:602 #3 /__w/e107/e107/e107_handlers/shortcode_handler.php:1130 #4 e_parse_shortcode->doCode #5 /__w/e107/e107/e107_handlers/shortcode_handler.php:996 #6 /__w/e107/e107/e107_handlers/e_parse_class.php:823 #7 /__w/e107/e107/e107_tests/tests/unit/e_parse_shortcodeTest.php:1588 #8 /__w/e107/e107/e107_tests/tests/unit/e_parse_shortcodeTest.php:220 --------- 8) scriptsTest: Admin includes Test tests/unit/scriptsTest.php:testAdminIncludes Error: ;1m [Error] Undefined constant "E_32_MAIN" #1 /__w/e107/e107/e107_handlers/sitelinks_class.php:735 #2 /__w/e107/e107/e107_handlers/sitelinks_class.php:887 #3 /__w/e107/e107/e107_admin/includes/categories.php:22 #4 /__w/e107/e107/e107_tests/tests/unit/scriptsTest.php:140 #5 /__w/e107/e107/e107_tests/tests/unit/scriptsTest.php:36 -- There was 1 failure: --------- 1) e107Test: Load admin icons Test tests/unit/e107Test.php:testLoadAdminIcons E_16_FACEBOOK is missing from admin_icons_template #1 /__w/e107/e107/e107_tests/tests/unit/e107Test.php:1054 --- e107_tests/tests/unit/e107Test.php | 1 + 1 file changed, 1 insertion(+) diff --git a/e107_tests/tests/unit/e107Test.php b/e107_tests/tests/unit/e107Test.php index cd4814a18..fdcd224a8 100644 --- a/e107_tests/tests/unit/e107Test.php +++ b/e107_tests/tests/unit/e107Test.php @@ -1076,6 +1076,7 @@ class e107Test extends \Codeception\Test\Unit $e107 = $this->e107; $templates = scandir(e_CORE . "templates"); + // Load these constants before other tests fail because of what this test does: $e107::loadAdminIcons(); $exclude = array( From 7cfc79d3357cfec97408d34dde106cbecdeb88d4 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Wed, 31 Mar 2021 01:48:07 -0500 Subject: [PATCH 5/8] Tests: Removed weird 17 rows threshold for clearing user_extended_struct Should fix rare flaky e107_user_extendedTest::testUserExtendedAllShortcode() --- e107_tests/tests/unit/e107_user_extendedTest.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/e107_tests/tests/unit/e107_user_extendedTest.php b/e107_tests/tests/unit/e107_user_extendedTest.php index 517bd2fba..030ad971f 100644 --- a/e107_tests/tests/unit/e107_user_extendedTest.php +++ b/e107_tests/tests/unit/e107_user_extendedTest.php @@ -116,21 +116,9 @@ ); // clear the table. - $sql = e107::getDb(); - /* $fieldCount = (int) $sql->count('user_extended_struct'); - - if($fieldCount > 17) - { - codecept_debug("Truncating user_extended_struct"); - $sql->truncate('user_extended_struct'); - - }*/ - $sql->truncate('user_extended_struct'); - - // Add a field of each type. foreach($this->structTypes as $k=> $v) { From 687db04bcb12355977b8f7576db41454110f7097 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Wed, 31 Mar 2021 17:57:30 -0500 Subject: [PATCH 6/8] Revert "Removed failing test with no assertions" This reverts commit 22e3f5383e5a62a3a8a1b6f7828c515402aa8123. --- e107_tests/tests/unit/pluginsTest.php | 77 +++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/e107_tests/tests/unit/pluginsTest.php b/e107_tests/tests/unit/pluginsTest.php index 37ff33a0d..e367c33e0 100644 --- a/e107_tests/tests/unit/pluginsTest.php +++ b/e107_tests/tests/unit/pluginsTest.php @@ -133,6 +133,83 @@ } + + public function testPluginScripts() + { + + $core = e107::getPlug()->getCorePluginList(); + + $exclude = array( + 'forum/forum_post.php', + 'forum/forum_viewtopic.php', // needs a major cleanup. + 'forum/index.php', + 'online/online_menu.php', // FIXME missing template for member/new + 'pm/pm.php', // FIXME contains exit, needs rework. + 'poll/admin_config.php', // FIXME convert to admin-ui + 'rss_menu/rss.php', // FIXME rework code into class. + 'tagcloud/tagcloud_menu.php', // FIXME - strange (PHP bug?), doesn't see the render() method. + 'tinymce4/wysiwyg.php', // javascript generator. + ); + + //DEBUG A SPECIFIC FILE : dir => file + // $focus = array('tagcloud'=>'tagcloud_menu.php'); + + + foreach($core as $plug) + { + $parm = null; // + e107::plugLan($plug, 'global'); // load global language (usually done in class2.php) + e107::getConfig()->setPref('plug_installed/'.$plug, 1); // simulate installed. + + $path = e_PLUGIN.$plug; + $files = scandir($path); + unset($files[0], $files[1]); // . and .. + + if(!empty($focus) && !isset($focus[$plug])) + { + continue; + } + + foreach($files as $f) + { + $filePath = $path.'/'.$f; + + if(!empty($focus) && $f !== $focus[$plug]) + { + continue; + } + + if(is_dir($filePath) || (strpos($f, '_sql.php') !== false) || strpos($f, '.php') === false || in_array($plug.'/'.$f, $exclude)) + { + continue; + } + + // echo " --- ".$filePath." --- \n"; + if(empty($focus)) + { + ob_start(); + } + require_once( $filePath); + if(empty($focus)) + { + ob_end_clean(); + } + // echo $plug.'/'.$f."\n"; + + } + + } + + + } + + + + + + + + /** * @see https://github.com/e107inc/e107/issues/3547 */ From d83c31fb8ce79a73af15695b23ee63b232876dab Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Tue, 13 Apr 2021 15:12:39 -0500 Subject: [PATCH 7/8] Stub e_date::computeLapse() in e_parse_shortcodeTest Prevents this flaky error: --------- 1) e_parse_shortcodeTest: User shortcodes Test tests/unit/e_parse_shortcodeTest.php:testUserShortcodes {USER_DAYSREGGED} != sc_user_daysregged() Failed asserting that two strings are equal. - Expected | + Actual @@ @@ -'3 years, 2 months, 1 day, 5 hours, 17 minutes, 16 seconds ago' +'3 years, 2 months, 1 day, 5 hours, 17 minutes, 15 seconds ago' #1 /__w/e107/e107/e107_tests/tests/unit/e_parse_shortcodeTest.php:1591 #2 /__w/e107/e107/e107_tests/tests/unit/e_parse_shortcodeTest.php:767 --- .../tests/unit/e_parse_shortcodeTest.php | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/e107_tests/tests/unit/e_parse_shortcodeTest.php b/e107_tests/tests/unit/e_parse_shortcodeTest.php index 65143ce1e..5a738ce3a 100644 --- a/e107_tests/tests/unit/e_parse_shortcodeTest.php +++ b/e107_tests/tests/unit/e_parse_shortcodeTest.php @@ -16,6 +16,10 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit * @var e_render */ private $original_e_render; + /** + * @var e_date + */ + private $original_e_date; public function _before() { @@ -36,11 +40,18 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit $this->original_e_render = e107::getRender(); $mock_e_render = $this->make('e_render'); e107::setRegistry('core/e107/singleton/e_render', $mock_e_render); + + $this->original_e_date = e107::getDate(); + $mock_e_date = $this->make('e_date', [ + 'computeLapse' => 'E107_TEST_STUBBED_OUT' + ]); + e107::setRegistry('core/e107/singleton/e_date', $mock_e_date); } public function _after() { e107::setRegistry('core/e107/singleton/e_render', $this->original_e_render); + e107::setRegistry('core/e107/singleton/e_date', $this->original_e_date); } // public function testShortcode_SITELINKS_ALT() @@ -125,7 +136,7 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit $result = $this->scParser->parseCodes($template, true); $this->assertSame($expected, $result); - + $array = array( 'LINK_TEXT' => 'Content', 'LINK_URL' => '#', @@ -360,7 +371,7 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit { $this->fail($e->getMessage()); } - + $vars = array( 'link_id' => '6', 'link_name' => 'News', @@ -379,7 +390,7 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit $sc->__construct(); $sc->setVars($vars); - + $this->processShortcodeMethods($sc); @@ -529,7 +540,7 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit } $sc->__construct(); - + $vars = array( 'page_id' => '1', 'page_title' => 'Article 1', @@ -727,7 +738,7 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit { $this->fail($e->getMessage()); } - + $vars = array( 'user_id' => '1', 'user_name' => 'admin', From bdc5c20df2ac5596520b3149339d71748f5abe48 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Fri, 16 Apr 2021 15:46:14 -0500 Subject: [PATCH 8/8] pluginsTest::testPluginScripts(): Standard sort file order --- e107_tests/tests/unit/pluginsTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/e107_tests/tests/unit/pluginsTest.php b/e107_tests/tests/unit/pluginsTest.php index e367c33e0..13a2c202e 100644 --- a/e107_tests/tests/unit/pluginsTest.php +++ b/e107_tests/tests/unit/pluginsTest.php @@ -133,6 +133,15 @@ } + public function testSortOrderPeriodUnderscore() + { + $expected = ['banner.php', 'banner_menu.php']; + $input = ['banner_menu.php', 'banner.php']; + + sort($input); + + $this->assertEquals($expected, $input); + } public function testPluginScripts() { @@ -165,6 +174,8 @@ $files = scandir($path); unset($files[0], $files[1]); // . and .. + sort($files); + if(!empty($focus) && !isset($focus[$plug])) { continue;