mirror of
https://github.com/e107inc/e107.git
synced 2025-08-13 01:54:12 +02:00
PHP error fixes.
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
@@ -515,11 +515,13 @@
|
||||
|
||||
);
|
||||
|
||||
$themeObj = $this->tm;
|
||||
|
||||
foreach($tests as $item=>$var)
|
||||
{
|
||||
$var['script'] = isset($var['script']) ? $var['script'] : null;
|
||||
|
||||
$result = $this->tm::getThemeLayout($pref, $defaultLayout, $var);
|
||||
$result = $themeObj::getThemeLayout($pref, $defaultLayout, $var);
|
||||
$this->assertEquals($var['expected'],$result, "Wrong theme layout returned for item [".$item."] ".$var['url']);
|
||||
// echo $var['url']."\t\t\t".$result."\n\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user