Total Complexity | 4 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | class FieldParserStaticGraphicTest extends AbstractFieldParserTest |
||
10 | { |
||
11 | /** |
||
12 | * @var FieldParserStaticGraphic |
||
13 | */ |
||
14 | private $parser; |
||
15 | |||
16 | /** |
||
17 | * @return SimpleXMLElement |
||
18 | */ |
||
19 | protected function getXmlField() |
||
20 | { |
||
21 | return new SimpleXMLElement( |
||
22 | '<Field Name="i am field name"> |
||
23 | <FldType>StaticGraphic</FldType> |
||
24 | <CLSID>{6AE09851-D80F-11D4-8DAE-0050DAFE8A9F}</CLSID> |
||
25 | <X>4200</X> |
||
26 | <Y>250</Y> |
||
27 | <W>3775</W> |
||
28 | <H>450</H> |
||
29 | <Ln>1</Ln> |
||
30 | <CalcData><![CDATA[i am path to graphic]]></CalcData> |
||
31 | <Data> |
||
32 | <Object> |
||
33 | <DataType>0</DataType> |
||
34 | <MaxNoOfChars>14</MaxNoOfChars> |
||
35 | <Default><![CDATA[i am path to graphic]]></Default> |
||
36 | </Object> |
||
37 | </Data> |
||
38 | <Graphic> |
||
39 | <GfxW>8500</GfxW> |
||
40 | <GfxH>4700</GfxH> |
||
41 | <StaticGfx> |
||
42 | <AspectRatio>0</AspectRatio> |
||
43 | </StaticGfx> |
||
44 | </Graphic> |
||
45 | </Field>' |
||
46 | ); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @return FieldParserStaticGraphic |
||
51 | */ |
||
52 | protected function getParser() |
||
59 | } |
||
60 | |||
61 | public function testGetGraphic() |
||
65 | } |
||
66 | } |
||
67 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: