1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-12 09:34:54 +02:00

Shortcode tests for list_new, pm, rss_menu, signin and simpleParse()

This commit is contained in:
Cameron
2021-01-08 17:00:23 -08:00
parent d86d8d999f
commit c8ba5fe30a
11 changed files with 363 additions and 396 deletions

View File

@@ -710,12 +710,25 @@ while($row = $sql->fetch())
{
}
*/
public function testSimpleParse()
{
$vars = array(
'CONTACT_SUBJECT'=> "My Subject",
'CONTACT_PERSON' => "My Name"
);
$template = "{CONTACT_SUBJECT} <b>{CONTACT_PERSON}</b>{MISSING_SHORTCODE}";
$result = $this->tp->simpleParse($template, $vars);
$this->assertEquals("My Subject <b>My Name</b>", $result);
$result = $this->tp->simpleParse($template, null);
$this->assertEquals(" <b></b>", $result);
}
*/
public function testToText()
{
$arr = array(