mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Couple more e_parse tests.
This commit is contained in:
parent
1a3054c041
commit
f7fdf19e24
@ -243,7 +243,11 @@ while($row = $sql->fetch())
|
||||
$actual = $this->tp->toForm($db);
|
||||
$expected = 'lr.src = window._lr.url + '/Scripts/api.js';';
|
||||
$this->assertEquals($expected, $actual);
|
||||
|
||||
|
||||
|
||||
$actual = $this->tp->toForm("[html]Something "hi"[/html]");
|
||||
$this->assertSame('[html]Something "hi"[/html]', $actual);
|
||||
|
||||
}
|
||||
/*
|
||||
public function testUstristr()
|
||||
@ -477,10 +481,6 @@ while($row = $sql->fetch())
|
||||
|
||||
}
|
||||
/*
|
||||
public function testHtml_truncate_old()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
|
||||
@ -697,11 +701,6 @@ while($row = $sql->fetch())
|
||||
|
||||
}
|
||||
|
||||
public function testMakeClickable()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function testSetThumbSize()
|
||||
{
|
||||
|
||||
@ -817,11 +816,19 @@ while($row = $sql->fetch())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user