mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Add more unit tests for is_html_content()
This commit is contained in:
parent
db8aa6fc2d
commit
8c752b9baf
1 changed files with 3 additions and 1 deletions
|
|
@ -176,9 +176,11 @@ class FunctionsTest extends \Codeception\TestCase\Test
|
|||
$this->assertTrue(is_html_content("Hello<br />\nWorld"));
|
||||
$this->assertTrue(is_html_content("<p class='foo'>Hello</p>\n<p class='bar'>World</p>"));
|
||||
$this->assertTrue(is_html_content("<div>Hello<br>\r\n\n\n\n\nWorld</div>"));
|
||||
$this->assertTrue(is_html_content('<p style="margin-top:16px">이럴 때는 <p> 태그나 <span> 태그를 사용해야 합니다.</p>'));
|
||||
$this->assertTrue(is_html_content('This is <span style="font-style:italic">italic</span> text.'));
|
||||
$this->assertFalse(is_html_content('This is an empty <span></span> tag. Most editors don\'t produce these.'));
|
||||
$this->assertFalse(is_html_content("You have to use a <p> tag."));
|
||||
$this->assertFalse(is_html_content('The <p class="foobar"> tag is the most appropriate here.'));
|
||||
$this->assertFalse(is_html_content("이럴 때는 <p> 태그나 <span> 태그를 사용해야 합니다."));
|
||||
$this->assertFalse(is_html_content("This is multiline content.\n<p> tag is here.\nOther lines are here, too.<br>\nMost lines don't have any tags."));
|
||||
$this->assertFalse(is_html_content("<p> tag is unbalanced here.\nAnother line!<br />\nAnd a dangling line..."));
|
||||
$this->assertFalse(is_html_content("Looks like a broken editor<br />\nthat produced\nthis kind of\nstring!</div>"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue