1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 03:10:50 +02:00

Possible test fix.

This commit is contained in:
Cameron
2021-01-08 10:15:40 -08:00
parent 452f594ad2
commit bdab296cae
2 changed files with 5 additions and 2 deletions

View File

@@ -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);

View File

@@ -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).