mirror of
https://github.com/e107inc/e107.git
synced 2025-07-30 11:20:25 +02:00
Possible test fix.
This commit is contained in:
@@ -110,11 +110,13 @@
|
|||||||
|
|
||||||
if ($parms[1] == 'text')
|
if ($parms[1] == 'text')
|
||||||
{
|
{
|
||||||
if(!isset($ueStruct['user_'.$parms[0]]))
|
if(!isset($parms[0]) || !isset($ueStruct['user_'.$parms[0]]) || !isset($ueStruct['user_'.$parms[0]]['user_extended_struct_text']))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text_val = $ueStruct['user_'.$parms[0]]['user_extended_struct_text'];
|
$text_val = $ueStruct['user_'.$parms[0]]['user_extended_struct_text'];
|
||||||
|
|
||||||
if($text_val)
|
if($text_val)
|
||||||
{
|
{
|
||||||
return (defined($text_val) ? constant($text_val) : $text_val);
|
return (defined($text_val) ? constant($text_val) : $text_val);
|
||||||
|
@@ -714,6 +714,7 @@ class e107Test extends \Codeception\Test\Unit
|
|||||||
public function testGetTemplate()
|
public function testGetTemplate()
|
||||||
{
|
{
|
||||||
e107::getConfig()->set('sitetheme', '_blank');
|
e107::getConfig()->set('sitetheme', '_blank');
|
||||||
|
require_once(e_PLUGIN."download/languages/English/English_front.php"); // LANS in template files.
|
||||||
|
|
||||||
$template = e107::getTemplate('download', null, null); // theme override is enabled by default.
|
$template = e107::getTemplate('download', null, null); // theme override is enabled by default.
|
||||||
$this->assertEquals('{DOWNLOAD_BREADCRUMB} Custom', $template['header']); // ie. should be from _blank theme download template (override of plugin).
|
$this->assertEquals('{DOWNLOAD_BREADCRUMB} Custom', $template['header']); // ie. should be from _blank theme download template (override of plugin).
|
||||||
|
Reference in New Issue
Block a user