@@ -147,23 +147,22 @@ public function testAxisOutline()
147
147
$ oShape ->getPlotArea ()->getAxisY ()->getOutline ()->getFill ()->getStartColor ()->setRGB ($ expectedColorY );
148
148
149
149
150
- $ oXMLDoc = TestHelperDOCX::getDocument ($ this ->oPresentation , 'PowerPoint2007 ' );
151
150
$ element = '/c:chartSpace/c:chart/c:plotArea/c:catAx/c:spPr ' ;
152
- $ this ->assertTrue ( $ oXMLDoc -> elementExists ( $ element , 'ppt/charts/ ' . $ oShape ->getIndexedFilename ()) );
151
+ $ this ->assertZipXmlElementExists ( 'ppt/charts/ ' . $ oShape ->getIndexedFilename (), $ element );
153
152
$ element = '/c:chartSpace/c:chart/c:plotArea/c:catAx/c:spPr/a:ln ' ;
154
- $ this ->assertTrue ( $ oXMLDoc -> elementExists ( $ element , 'ppt/charts/ ' . $ oShape ->getIndexedFilename ()) );
155
- $ this ->assertEquals (Drawing:: pixelsToEmu (Drawing:: pointsToPixels ( $ expectedWidthX )), $ oXMLDoc -> getElementAttribute ( $ element , 'w ' , ' ppt/charts/ ' . $ oShape -> getIndexedFilename ( )));
153
+ $ this ->assertZipXmlElementExists ( 'ppt/charts/ ' . $ oShape ->getIndexedFilename (), $ element );
154
+ $ this ->assertZipXmlAttributeEquals ( ' ppt/charts/ ' . $ oShape -> getIndexedFilename (), $ element , 'w ' , Drawing:: pixelsToEmu (Drawing:: pointsToPixels ( $ expectedWidthX )));
156
155
$ element = '/c:chartSpace/c:chart/c:plotArea/c:catAx/c:spPr/a:ln/a:solidFill/a:srgbClr ' ;
157
- $ this ->assertTrue ( $ oXMLDoc -> elementExists ( $ element , 'ppt/charts/ ' . $ oShape ->getIndexedFilename ()) );
158
- $ this ->assertEquals ( $ expectedColorX , $ oXMLDoc -> getElementAttribute ( $ element , 'val ' , ' ppt/charts/ ' . $ oShape -> getIndexedFilename ()) );
156
+ $ this ->assertZipXmlElementExists ( 'ppt/charts/ ' . $ oShape ->getIndexedFilename (), $ element );
157
+ $ this ->assertZipXmlAttributeEquals ( ' ppt/charts/ ' . $ oShape -> getIndexedFilename (), $ element , 'val ' , $ expectedColorX );
159
158
$ element = '/c:chartSpace/c:chart/c:plotArea/c:valAx/c:spPr ' ;
160
- $ this ->assertTrue ( $ oXMLDoc -> elementExists ( $ element , 'ppt/charts/ ' . $ oShape ->getIndexedFilename ()) );
159
+ $ this ->assertZipXmlElementExists ( 'ppt/charts/ ' . $ oShape ->getIndexedFilename (), $ element );
161
160
$ element = '/c:chartSpace/c:chart/c:plotArea/c:valAx/c:spPr/a:ln ' ;
162
- $ this ->assertTrue ( $ oXMLDoc -> elementExists ( $ element , 'ppt/charts/ ' . $ oShape ->getIndexedFilename ()) );
163
- $ this ->assertEquals (Drawing:: pixelsToEmu (Drawing:: pointsToPixels ( $ expectedWidthY )), $ oXMLDoc -> getElementAttribute ( $ element , 'w ' , ' ppt/charts/ ' . $ oShape -> getIndexedFilename ( )));
161
+ $ this ->assertZipXmlElementExists ( 'ppt/charts/ ' . $ oShape ->getIndexedFilename (), $ element );
162
+ $ this ->assertZipXmlAttributeEquals ( ' ppt/charts/ ' . $ oShape -> getIndexedFilename (), $ element , 'w ' , Drawing:: pixelsToEmu (Drawing:: pointsToPixels ( $ expectedWidthY )));
164
163
$ element = '/c:chartSpace/c:chart/c:plotArea/c:valAx/c:spPr/a:ln/a:solidFill/a:srgbClr ' ;
165
- $ this ->assertTrue ( $ oXMLDoc -> elementExists ( $ element , 'ppt/charts/ ' . $ oShape ->getIndexedFilename ()) );
166
- $ this ->assertEquals ( $ expectedColorY , $ oXMLDoc -> getElementAttribute ( $ element , 'val ' , ' ppt/charts/ ' . $ oShape -> getIndexedFilename ()) );
164
+ $ this ->assertZipXmlElementExists ( 'ppt/charts/ ' . $ oShape ->getIndexedFilename (), $ element );
165
+ $ this ->assertZipXmlAttributeEquals ( ' ppt/charts/ ' . $ oShape -> getIndexedFilename (), $ element , 'val ' , $ expectedColorY );
167
166
}
168
167
169
168
public function testTypeArea ()
@@ -549,10 +548,8 @@ public function testTypeLineSeriesOutline()
549
548
$ expectedElement = '/c:chartSpace/c:chart/c:plotArea/c:lineChart/c:ser/c:spPr/a:ln ' ;
550
549
551
550
$ oOutline = new Outline ();
552
- // Define the color
553
551
$ oOutline ->getFill ()->setFillType (Fill::FILL_SOLID );
554
552
$ oOutline ->getFill ()->setStartColor (new Color (Color::COLOR_YELLOW ));
555
- // Define the width (in points)
556
553
$ oOutline ->setWidth ($ expectedWidth );
557
554
558
555
$ oSlide = $ this ->oPresentation ->getActiveSlide ();
0 commit comments