mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR: Added a test case for saving links without a href attribute in HtmlEditorField.
From: Andrew Short <andrewjshort@gmail.com> git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88800 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2be58d19f3
commit
360dd5ebd9
@ -120,4 +120,16 @@ class HtmlEditorFieldTest extends FunctionalTest {
|
||||
$this->assertEquals("<p>First Paragraph</p>\n\n<p>Second Paragraph</p>", $sitetree->Content);
|
||||
}
|
||||
|
||||
public function testSavingLinksWithoutHref() {
|
||||
$sitetree = $this->objFromFixture('SiteTree', 'home');
|
||||
$editor = new HtmlEditorField('Content');
|
||||
|
||||
$editor->setValue('<p><a name="example-anchor"></a></p>');
|
||||
$editor->saveInto($sitetree);
|
||||
|
||||
$this->assertEquals (
|
||||
'<p><a name="example-anchor"/></p>', $sitetree->Content, 'Saving a link without a href attribute works'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user