Completed
Pull Request — master (#15)
by John
02:39
created

GraphicPrimitiveParserTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 10
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 10
loc 10
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace Graze\CiffRenderer\Test;
4
5
use Graze\CiffRenderer\Field\Parser\GraphicPrimitiveParser;
6
7 View Code Duplication
class GraphicPrimitiveParserTest extends \PHPUnit_Framework_TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

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.

Loading history...
8
{
9
    protected $parser;
0 ignored issues
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
10
11
    public function setUp()
12
    {
13
        $pathToFixture = sprintf('%s/Fixture/GraphicPrimitiveParserFixture.xml', dirname(__FILE__));
14
15
        $xml = simplexml_load_file($pathToFixture);
16
17
        $this->parser = new GraphicPrimitiveParser();
18
19
        $this->parser->setXmlField($xml);
20
    }
21
22
    public function testGetShape()
23
    {
24
        $this->assertEquals('OutlineBox', $this->parser->getShape());
25
    }
26
27
    public function testGetLineWeight()
28
    {
29
        $this->assertEquals(25, $this->parser->getLineWeight());
30
    }
31
}
32