diff --git a/e107_core/shortcodes/batch/signup_shortcodes.php b/e107_core/shortcodes/batch/signup_shortcodes.php
index 474d47019..004a9a261 100755
--- a/e107_core/shortcodes/batch/signup_shortcodes.php
+++ b/e107_core/shortcodes/batch/signup_shortcodes.php
@@ -469,7 +469,16 @@ class signup_shortcodes extends e_shortcode
{
if(empty($this->template['extended-user-fields']))
{
- return (ADMIN) ? "SIGNUP 'extended-user-fields' template not defined" : '';
+ $msg = "SIGNUP 'extended-user-fields' template is not defined or empty";
+ trigger_error($ms);
+ return (ADMIN) ? $msg : '';
+ }
+
+ if(empty($this->template['extended-category']))
+ {
+ $msg = "SIGNUP 'extended-user-fields' template is not defined or empty";
+ trigger_error($ms);
+ return (ADMIN) ? $msg : '';
}
@@ -517,7 +526,7 @@ class signup_shortcodes extends e_shortcode
$catName = $cat['user_extended_struct_text'] ? $cat['user_extended_struct_text'] : $cat['user_extended_struct_name'];
$catName = defset($catName, $catName);
- $text .= str_replace('{EXTENDED_CAT_TEXT}', $tp->toHTML($catName, false, 'emotes_off,defs'), $this->template['extended-category']);
+ $text .= str_replace('{EXTENDED_CAT_TEXT}', $tp->toHTML($catName, false, 'TITLE'), $this->template['extended-category']);
$done_heading = true;
}
diff --git a/e107_tests/tests/unit/e107Test.php b/e107_tests/tests/unit/e107Test.php
index 529b444c2..defe4ada8 100644
--- a/e107_tests/tests/unit/e107Test.php
+++ b/e107_tests/tests/unit/e107Test.php
@@ -56,17 +56,122 @@ class e107Test extends \Codeception\Test\Unit
public function testRenderLayout()
{
- $LAYOUT = file_get_contents(e_THEME . "bootstrap3/theme.html");
+ $opts = array (
+ 'magicSC' => array(
+ '{---HEADER---}' => '
MY HEADER
',
+ '{---FOOTER---}' => 'MY FOOTER
',
+ ),
+ 'bodyStart' => ''
+ );
+
+
+ // test code insertion.
+ $LAYOUT = '
+
+
+
+
+ {NAVIGATION=main}
+ {BOOTSTRAP_USERNAV: placement=top}
+
+
+
+
+
+ {---HEADER---}
+
+
+ {---LAYOUT---}
+
+
+
+ {SETSTYLE=default}
+
+
+ {---MODAL---}
+
+ {---FOOTER---}
+
+
+
+ ';
+
+
ob_start();
- e107::renderLayout($LAYOUT);
+ e107::renderLayout($LAYOUT, $opts);
$result = ob_get_clean();
- $this->assertStringNotContainsString('{MENU=1}', $result);
- $this->assertStringNotContainsString('{NAVIGATION=main}', $result);
+
+ $this->assertStringContainsString('MY HEADER
', $result);
+ $this->assertStringContainsString('MY FOOTER
', $result);
+ $this->assertStringContainsString('', $result);
$this->assertStringNotContainsString('{BOOTSTRAP_BRANDING}', $result);
+ // var_export($result);
}
diff --git a/e107_tests/tests/unit/e107_user_extendedTest.php b/e107_tests/tests/unit/e107_user_extendedTest.php
index 5da5f4014..6a24c0338 100644
--- a/e107_tests/tests/unit/e107_user_extendedTest.php
+++ b/e107_tests/tests/unit/e107_user_extendedTest.php
@@ -33,7 +33,6 @@
$this->assertTrue(false, "Couldn't load e107_user_extended object");
}
-
$this->structTypes = array(
'text' => EUF_TEXT,
'homepage' => EUF_TEXT,
@@ -170,7 +169,10 @@
'order' => 1,
);
- $this->ue->user_extended_add($insertCategory);
+ if($this->ue->user_extended_add($insertCategory) === false)
+ {
+ trigger_error("failed to create user-extended category");
+ }
// Insert a User-Extended Category
$insertCategory2 = array(
@@ -183,7 +185,10 @@
'order' => 2,
);
- $this->ue->user_extended_add($insertCategory2);
+ if($this->ue->user_extended_add($insertCategory2) === false)
+ {
+ trigger_error("failed to create user-extended category");
+ }
// As $_POSTED.
$this->userValues = array(
@@ -468,8 +473,8 @@
$template = array(
- 'extended-category' => "-- {EXTENDED_CAT_TEXT} --",
- 'extended-user-fields' => "" // {EXTENDED_USER_FIELD_EDIT}
+ 'extended-category' => "\n-- {EXTENDED_CAT_TEXT} --\n",
+ 'extended-user-fields' => "\n" // {EXTENDED_USER_FIELD_EDIT}
);
$expected = array(