1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Use e107:: in some parts of tests.

This commit is contained in:
Cameron
2021-01-25 13:29:39 -08:00
parent 1479e9ba59
commit ef8844b019
3 changed files with 20 additions and 8 deletions

View File

@@ -900,6 +900,15 @@ class e107Test extends \Codeception\Test\Unit
$template2 = $e107::loadAdminIcons();
$this->assertSame($new, $template2);
$range = range(1,10);
foreach($range as $t)
{
e107::loadAdminIcons();
$e107::loadAdminIcons();
}
}

View File

@@ -152,8 +152,8 @@ class e_formTest extends \Codeception\Test\Unit
{
try
{
$this->_frm = $this->make('e_form');
$this->_frm->__construct();
$this->_frm = e107::getForm();
// $this->_frm->__construct();
}
catch (Exception $e)
{

View File

@@ -156,7 +156,9 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
public function testAdminShortcodes()
{
require_once(e_CORE."shortcodes/batch/admin_shortcodes.php");
// require_once(e_CORE."shortcodes/batch/admin_shortcodes.php");
e107::getScBatch('admin');
require_once(e_LANGUAGEDIR.'English/admin/lan_header.php');
require_once(e_LANGUAGEDIR.'English/admin/lan_footer.php');
@@ -608,11 +610,11 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
public function testSignupShortcodes()
{
require_once(e_CORE."shortcodes/batch/signup_shortcodes.php");
// require_once(e_CORE."shortcodes/batch/signup_shortcodes.php");
try
{
$sc = $this->make('signup_shortcodes');
$sc = e107::getScBatch('signup'); // $this->make('signup_shortcodes');
}
catch (Exception $e)
{
@@ -702,12 +704,13 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
public function testUserSettingsShortcodes()
{
require_once(e_CORE."shortcodes/batch/usersettings_shortcodes.php");
// require_once(e_CORE."shortcodes/batch/usersettings_shortcodes.php");
try
{
/** @var user_shortcodes $sc */
$sc = $this->make('usersettings_shortcodes');
// $sc = $this->make('usersettings_shortcodes');
$sc = e107::getScBatch('usersettings');
}
catch (Exception $e)
{
@@ -746,7 +749,7 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
);
$sc->__construct();
// $sc->__construct();
$sc->setVars($vars);
// these are tested in the user-extended test.