Adds test for text metadata
This commit is contained in:
parent
0686795afc
commit
a50f878725
|
@ -50,6 +50,6 @@ class Text extends Metadata_Type {
|
|||
} else {
|
||||
$return = $this->make_clickable_links($value);
|
||||
}
|
||||
return $return;
|
||||
return force_balance_tags($return);
|
||||
}
|
||||
}
|
|
@ -305,9 +305,12 @@ class Item_Metadata extends TAINACAN_UnitTestCase {
|
|||
$this->assertEquals($item_metadata_textarea->get_value_as_html(), $response_textarea);
|
||||
|
||||
// Poor HTML entry tests
|
||||
$malformatted_HTML = "<p> I started my content <div> and make something else here </div> withou closing it properly";
|
||||
$malformatted_HTML = "<p> I started my content <div> and make something else here </div> without closing its HTML properly";
|
||||
|
||||
$item_metadata_text->set_value($malformatted_HTML);
|
||||
$item_metadata_textarea->set_value($malformatted_HTML);
|
||||
|
||||
$this->assertEquals($item_metadata_text->get_value_as_html(), $malformatted_HTML ."</p>");
|
||||
$this->assertEquals($item_metadata_textarea->get_value_as_html(), $malformatted_HTML ."</p>");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue