Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Lines | 8 |
Ratio | 88.89 % |
Tests | 5 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
15 | 1 | View Code Duplication | public function testFieldWithoutTitle() |
16 | { |
||
17 | //$headingLevel = 2, $allowHTML = false, $form = nul |
||
18 | 1 | $field = new MapField('NameOfField'); |
|
19 | $expected = '<div class="editableMap"><div class="middleColumn" id="Nam' |
||
20 | .'eOfField" style="width:100%;height:300px;margin:5px 0px 5p' |
||
21 | 1 | .'x 5px;position:relative;"></div></div>'; |
|
22 | 1 | $this->assertEquals($expected, $field->Field()); |
|
23 | 1 | } |
|
24 | } |
||
25 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.