|
@@ 94-100 (lines=7) @@
|
| 91 |
|
$this->assertEquals(false, $obj->HasBrokenFile, 'Referenced image file exists.'); |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
public function testMultiLineSaving() { |
| 95 |
|
$obj = $this->objFromFixture('HtmlEditorFieldTest_Object', 'home'); |
| 96 |
|
$editor = new HtmlEditorField('Content'); |
| 97 |
|
$editor->setValue('<p>First Paragraph</p><p>Second Paragraph</p>'); |
| 98 |
|
$editor->saveInto($obj); |
| 99 |
|
$this->assertEquals('<p>First Paragraph</p><p>Second Paragraph</p>', $obj->Content); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
public function testSavingLinksWithoutHref() { |
| 103 |
|
$obj = $this->objFromFixture('HtmlEditorFieldTest_Object', 'home'); |
|
@@ 102-112 (lines=11) @@
|
| 99 |
|
$this->assertEquals('<p>First Paragraph</p><p>Second Paragraph</p>', $obj->Content); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
public function testSavingLinksWithoutHref() { |
| 103 |
|
$obj = $this->objFromFixture('HtmlEditorFieldTest_Object', 'home'); |
| 104 |
|
$editor = new HtmlEditorField('Content'); |
| 105 |
|
|
| 106 |
|
$editor->setValue('<p><a name="example-anchor"></a></p>'); |
| 107 |
|
$editor->saveInto($obj); |
| 108 |
|
|
| 109 |
|
$this->assertEquals ( |
| 110 |
|
'<p><a name="example-anchor"></a></p>', $obj->Content, 'Saving a link without a href attribute works' |
| 111 |
|
); |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
public function testGetAnchors() { |
| 115 |
|
if (!class_exists('Page')) { |