mirror of
https://github.com/e107inc/e107.git
synced 2025-07-16 12:36:26 +02:00
Couple more e_parse tests.
This commit is contained in:
@ -243,7 +243,11 @@ while($row = $sql->fetch())
|
|||||||
$actual = $this->tp->toForm($db);
|
$actual = $this->tp->toForm($db);
|
||||||
$expected = 'lr.src = window._lr.url + '/Scripts/api.js';';
|
$expected = 'lr.src = window._lr.url + '/Scripts/api.js';';
|
||||||
$this->assertEquals($expected, $actual);
|
$this->assertEquals($expected, $actual);
|
||||||
|
|
||||||
|
|
||||||
|
$actual = $this->tp->toForm("[html]Something "hi"[/html]");
|
||||||
|
$this->assertSame('[html]Something "hi"[/html]', $actual);
|
||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
public function testUstristr()
|
public function testUstristr()
|
||||||
@ -477,10 +481,6 @@ while($row = $sql->fetch())
|
|||||||
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
public function testHtml_truncate_old()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testToJSONhelper()
|
public function testToJSONhelper()
|
||||||
{
|
{
|
||||||
@ -491,12 +491,16 @@ while($row = $sql->fetch())
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
public function testPost_toForm()
|
public function testPostToForm()
|
||||||
{
|
{
|
||||||
|
$text = "<div class='something'>My Test</div>";
|
||||||
|
$expected = '<div class='something'>My Test</div>';
|
||||||
|
$result = $this->tp->post_toForm($text);
|
||||||
|
$this->assertSame($expected, $result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
public function testHtml_truncate()
|
public function testHtml_truncate()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -697,11 +701,6 @@ while($row = $sql->fetch())
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testMakeClickable()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testSetThumbSize()
|
public function testSetThumbSize()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -817,11 +816,19 @@ while($row = $sql->fetch())
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
public function testPost_toHTML()
|
public function testPost_toHTML()
|
||||||
{
|
{
|
||||||
|
$text = "<di style='width:100%'>Test</di>"; // invalid html.
|
||||||
|
$result = $this->tp->post_toHTML($text);
|
||||||
|
$this->assertEmpty($result);
|
||||||
|
|
||||||
}*/
|
$text = "<div style='width:100%'>Test</div>"; // valid html.
|
||||||
|
$cleaned = '<div style="width:100%">Test</div>'; // valid and cleaned html.
|
||||||
|
$result = $this->tp->post_toHTML($text);
|
||||||
|
$this->assertSame($cleaned, $result);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
public function testAddAllowedTag()
|
public function testAddAllowedTag()
|
||||||
|
Reference in New Issue
Block a user