1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-09 16:17:14 +02:00

PHP error fixes.

This commit is contained in:
Cameron
2021-02-22 12:22:50 -08:00
parent 340ff05fcd
commit 52a554987b
3 changed files with 34 additions and 5 deletions

View File

@@ -105,6 +105,32 @@ class e_parse_shortcodeTest extends \Codeception\Test\Unit
}
public function testParseCodesWithMagicShortcodes()
{
$template = '{SITENAME} {---BREADCRUMB---}';
$expected = 'e107 {---BREADCRUMB---}';
$result = $this->scParser->parseCodes($template, true);
$this->assertSame($expected, $result);
$array = array(
'LINK_TEXT' => 'Content',
'LINK_URL' => '#',
'ONCLICK' => '',
'SUB_HEAD' => '',
'SUB_MENU' => '',
);
$result = $this->scParser->parseCodes($template, true, $array);
$this->assertSame($expected, $result);
$sc = e107::getScBatch('_blank', true, '_blank');
$this->assertIsObject($sc);
$result = $this->scParser->parseCodes($template, true, $sc);
$this->assertSame($expected, $result);
}
public function testParseCodesWithClass()
{