Skip to content

Commit

Permalink
Fix undefined constants when e107Test::testGetCoreTemplate() runs first
Browse files Browse the repository at this point in the history
---------
1) e_navigationTest: Admin links plugins
 Test  tests/unit/e_navigationTest.php:testAdminLinksPlugins

Error: ;1m  [Error] Undefined constant "E_16_PLUGMANAGER"

e107inc#1  /__w/e107/e107/e107_handlers/sitelinks_class.php:882
e107inc#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"

e107inc#1  /__w/e107/e107/e107_handlers/sitelinks_class.php:735
e107inc#2  /__w/e107/e107/e107_handlers/sitelinks_class.php:887
e107inc#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"

e107inc#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"

e107inc#1  /__w/e107/e107/e107_handlers/sitelinks_class.php:735
e107inc#2  /__w/e107/e107/e107_handlers/sitelinks_class.php:887
e107inc#3  /__w/e107/e107/e107_admin/includes/infopanel.php:110
e107inc#4  /__w/e107/e107/e107_admin/includes/flexpanel.php:66
e107inc#5  /__w/e107/e107/e107_admin/admin.php:63
e107inc#6  /__w/e107/e107/e107_tests/tests/unit/scriptsTest.php:140
e107inc#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"

e107inc#1  /__w/e107/e107/e107_handlers/form_handler.php:5829
e107inc#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"

e107inc#1  /__w/e107/e107/e107_handlers/sitelinks_class.php:735
e107inc#2  /__w/e107/e107/e107_handlers/sitelinks_class.php:887
e107inc#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"

e107inc#1  /__w/e107/e107/e107_core/shortcodes/batch/admin_shortcodes.php:518
e107inc#2  /__w/e107/e107/e107_core/shortcodes/batch/admin_shortcodes.php:602
e107inc#3  /__w/e107/e107/e107_handlers/shortcode_handler.php:1130
e107inc#4  e_parse_shortcode->doCode
e107inc#5  /__w/e107/e107/e107_handlers/shortcode_handler.php:996
e107inc#6  /__w/e107/e107/e107_handlers/e_parse_class.php:823
e107inc#7  /__w/e107/e107/e107_tests/tests/unit/e_parse_shortcodeTest.php:1588
e107inc#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"

e107inc#1  /__w/e107/e107/e107_handlers/sitelinks_class.php:735
e107inc#2  /__w/e107/e107/e107_handlers/sitelinks_class.php:887
e107inc#3  /__w/e107/e107/e107_admin/includes/categories.php:22
e107inc#4  /__w/e107/e107/e107_tests/tests/unit/scriptsTest.php:140
e107inc#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
e107inc#1  /__w/e107/e107/e107_tests/tests/unit/e107Test.php:1054
  • Loading branch information
Deltik committed Apr 13, 2021
1 parent c68604b commit e261e4f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions e107_tests/tests/unit/e107Test.php
Expand Up @@ -1076,6 +1076,7 @@ public function testGetCoreTemplate()
$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(
Expand Down

0 comments on commit e261e4f

Please sign in to comment.