Code Duplication    Length = 7-11 lines in 2 locations

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

@@ 154-160 (lines=7) @@
151
        $this->assertEquals(false, $obj->HasBrokenFile, 'Referenced image file exists.');
152
    }
153
154
    public function testMultiLineSaving()
155
    {
156
        $obj = $this->objFromFixture(TestObject::class, 'home');
157
        $editor   = new HTMLEditorField('Content');
158
        $editor->setValue('<p>First Paragraph</p><p>Second Paragraph</p>');
159
        $editor->saveInto($obj);
160
        $this->assertEquals('<p>First Paragraph</p><p>Second Paragraph</p>', $obj->Content);
161
    }
162
163
    public function testSavingLinksWithoutHref()
@@ 163-173 (lines=11) @@
160
        $this->assertEquals('<p>First Paragraph</p><p>Second Paragraph</p>', $obj->Content);
161
    }
162
163
    public function testSavingLinksWithoutHref()
164
    {
165
        $obj = $this->objFromFixture(TestObject::class, 'home');
166
        $editor   = new HTMLEditorField('Content');
167
168
        $editor->setValue('<p><a name="example-anchor"></a></p>');
169
        $editor->saveInto($obj);
170
171
        $this->assertEquals(
172
            '<p><a name="example-anchor"></a></p>',
173
            $obj->Content,
174
            'Saving a link without a href attribute works'
175
        );
176
    }