Code Duplication    Length = 7-7 lines in 8 locations

tests/unit/Parser/FieldParser/FieldParserBarcodeTest.php 3 locations

@@ 37-43 (lines=7) @@
34
        $this->assertEquals($size, $this->getParser()->getFontSize());
35
    }
36
37
    public function testGetFontFace()
38
    {
39
        $face = 'i am face';
40
        SimpleXmlElementChainMocker::addChain(['xmlField', 'Text', 'Font', 'Face'], $face);
41
42
        $this->assertEquals($face, $this->getParser()->getFontFace());
43
    }
44
45
    public function testGetOrientation()
46
    {
@@ 45-51 (lines=7) @@
42
        $this->assertEquals($face, $this->getParser()->getFontFace());
43
    }
44
45
    public function testGetOrientation()
46
    {
47
        $orientation = 90;
48
        SimpleXmlElementChainMocker::addChain(['xmlField', 'Orientation'], $orientation);
49
50
        $this->assertEquals($orientation, $this->getParser()->getOrientation());
51
    }
52
53
    public function testGetText()
54
    {
@@ 96-102 (lines=7) @@
93
        $this->assertEquals($fieldMergeText . $fieldStandardText, $this->getParser()->getText());
94
    }
95
96
    public function testGetIsInverse()
97
    {
98
        $isInverse = 1;
99
        SimpleXmlElementChainMocker::addChain(['xmlField', 'Inverse'], $isInverse);
100
101
        $this->assertEquals(true, $this->getParser()->getOrientation());
102
    }
103
}
104

tests/unit/Parser/FieldParser/FieldParserFixedTextTest.php 3 locations

@@ 29-35 (lines=7) @@
26
        return $this->parser;
27
    }
28
29
    public function testGetFontSize()
30
    {
31
        $size = 3.4;
32
        SimpleXmlElementChainMocker::addChain(['xmlField', 'Text', 'Font', 'Pitch'], $size);
33
34
        $this->assertEquals($size, $this->getParser()->getFontSize());
35
    }
36
37
    public function testGetFontFace()
38
    {
@@ 37-43 (lines=7) @@
34
        $this->assertEquals($size, $this->getParser()->getFontSize());
35
    }
36
37
    public function testGetFontFace()
38
    {
39
        $face = 'i am face';
40
        SimpleXmlElementChainMocker::addChain(['xmlField', 'Text', 'Font', 'Face'], $face);
41
42
        $this->assertEquals($face, $this->getParser()->getFontFace());
43
    }
44
45
    public function testGetOrientation()
46
    {
@@ 45-51 (lines=7) @@
42
        $this->assertEquals($face, $this->getParser()->getFontFace());
43
    }
44
45
    public function testGetOrientation()
46
    {
47
        $orientation = 90;
48
        SimpleXmlElementChainMocker::addChain(['xmlField', 'Orientation'], $orientation);
49
50
        $this->assertEquals($orientation, $this->getParser()->getOrientation());
51
    }
52
53
    public function testGetText()
54
    {

tests/unit/Parser/FieldParser/FieldParserGraphicPrimitiveTest.php 2 locations

@@ 28-34 (lines=7) @@
25
        return $this->parser;
26
    }
27
28
    public function testGetShape()
29
    {
30
        $shape = 'i am shape';
31
        SimpleXmlElementChainMocker::addChain(['xmlField', 'Graphic', 'Primitive', 'Shape'], $shape);
32
33
        $this->assertEquals($shape, $this->getParser()->getShape());
34
    }
35
36
    public function testGetLineWeight()
37
    {
@@ 36-42 (lines=7) @@
33
        $this->assertEquals($shape, $this->getParser()->getShape());
34
    }
35
36
    public function testGetLineWeight()
37
    {
38
        $lineWeight = 1.2;
39
        SimpleXmlElementChainMocker::addChain(['xmlField', 'Graphic', 'Primitive', 'LineW'], $lineWeight);
40
41
        $this->assertEquals($lineWeight, $this->getParser()->getLineWeight());
42
    }
43
}
44