Code Duplication    Length = 7-11 lines in 2 locations

tests/php/Forms/HTMLEditor/HTMLEditorFieldTest.php 2 locations

@@ 141-147 (lines=7) @@
138
        $this->assertEquals(false, $obj->HasBrokenFile, 'Referenced image file exists.');
139
    }
140
141
    public function testMultiLineSaving()
142
    {
143
        $obj = $this->objFromFixture(TestObject::class, 'home');
144
        $editor   = new HTMLEditorField('Content');
145
        $editor->setValue('<p>First Paragraph</p><p>Second Paragraph</p>');
146
        $editor->saveInto($obj);
147
        $this->assertEquals('<p>First Paragraph</p><p>Second Paragraph</p>', $obj->Content);
148
    }
149
150
    public function testSavingLinksWithoutHref()
@@ 150-160 (lines=11) @@
147
        $this->assertEquals('<p>First Paragraph</p><p>Second Paragraph</p>', $obj->Content);
148
    }
149
150
    public function testSavingLinksWithoutHref()
151
    {
152
        $obj = $this->objFromFixture(TestObject::class, 'home');
153
        $editor   = new HTMLEditorField('Content');
154
155
        $editor->setValue('<p><a name="example-anchor"></a></p>');
156
        $editor->saveInto($obj);
157
158
        $this->assertEquals(
159
            '<p><a name="example-anchor"></a></p>',
160
            $obj->Content,
161
            'Saving a link without a href attribute works'
162
        );
163
    }