@@ -47,15 +47,13 @@ class ObjectsChartTest extends \PHPUnit_Framework_TestCase
47
47
*/
48
48
public function tearDown ()
49
49
{
50
- parent ::tearDown ();
51
50
TestHelperDOCX::clear ();
52
51
}
53
52
54
53
public function testAxisFont ()
55
54
{
56
-
57
- $ phpPresentation = new PhpPresentation ();
58
- $ oSlide = $ phpPresentation ->getActiveSlide ();
55
+ $ oPhpPresentation = new PhpPresentation ();
56
+ $ oSlide = $ oPhpPresentation ->getActiveSlide ();
59
57
$ oShape = $ oSlide ->createChartShape ();
60
58
$ oSeries = new Series ('Series ' , array ('Jan ' => 1 , 'Feb ' => 5 , 'Mar ' => 2 ));
61
59
$ oBar = new Bar ();
@@ -68,25 +66,25 @@ public function testAxisFont()
68
66
$ oShape ->getPlotArea ()->getAxisY ()->getFont ()->setSize (16 );
69
67
$ oShape ->getPlotArea ()->getAxisY ()->getFont ()->setName ('Arial ' );
70
68
71
- $ pres = TestHelperDOCX::getDocument ($ phpPresentation , 'ODPresentation ' );
69
+ $ oXMLDoc = TestHelperDOCX::getDocument ($ oPhpPresentation , 'ODPresentation ' );
72
70
73
71
$ element = '/office:document-content/office:body/office:chart/chart:chart ' ;
74
- $ this ->assertTrue ($ pres ->elementExists ($ element , 'Object 1/content.xml ' ));
75
- $ this ->assertEquals ('chart:bar ' , $ pres ->getElementAttribute ($ element , 'chart:class ' , 'Object 1/content.xml ' ));
72
+ $ this ->assertTrue ($ oXMLDoc ->elementExists ($ element , 'Object 1/content.xml ' ));
73
+ $ this ->assertEquals ('chart:bar ' , $ oXMLDoc ->getElementAttribute ($ element , 'chart:class ' , 'Object 1/content.xml ' ));
76
74
77
75
$ element = '/office:document-content/office:automatic-styles/style:style[@style:name= \'styleAxisX \']/style:text-properties ' ;
78
- $ this ->assertTrue ($ pres ->elementExists ($ element , 'Object 1/content.xml ' ));
79
- $ this ->assertEquals ('#AABBCC ' , $ pres ->getElementAttribute ($ element , 'fo:color ' , 'Object 1/content.xml ' ));//Color XAxis
80
- $ this ->assertEquals ('italic ' , $ pres ->getElementAttribute ($ element , 'fo:font-style ' , 'Object 1/content.xml ' ));//Italic XAxis
81
- $ this ->assertEquals ('10pt ' , $ pres ->getElementAttribute ($ element , 'fo:font-size ' , 'Object 1/content.xml ' ));//Size XAxis
82
- $ this ->assertEquals ('Calibri ' , $ pres ->getElementAttribute ($ element , 'fo:font-family ' , 'Object 1/content.xml ' ));//Size XAxis
76
+ $ this ->assertTrue ($ oXMLDoc ->elementExists ($ element , 'Object 1/content.xml ' ));
77
+ $ this ->assertEquals ('#AABBCC ' , $ oXMLDoc ->getElementAttribute ($ element , 'fo:color ' , 'Object 1/content.xml ' ));//Color XAxis
78
+ $ this ->assertEquals ('italic ' , $ oXMLDoc ->getElementAttribute ($ element , 'fo:font-style ' , 'Object 1/content.xml ' ));//Italic XAxis
79
+ $ this ->assertEquals ('10pt ' , $ oXMLDoc ->getElementAttribute ($ element , 'fo:font-size ' , 'Object 1/content.xml ' ));//Size XAxis
80
+ $ this ->assertEquals ('Calibri ' , $ oXMLDoc ->getElementAttribute ($ element , 'fo:font-family ' , 'Object 1/content.xml ' ));//Size XAxis
83
81
84
82
$ element = '/office:document-content/office:automatic-styles/style:style[@style:name= \'styleAxisY \']/style:text-properties ' ;
85
- $ this ->assertTrue ($ pres ->elementExists ($ element , 'Object 1/content.xml ' ));
86
- $ this ->assertEquals ('#00FF00 ' , $ pres ->getElementAttribute ($ element , 'fo:color ' , 'Object 1/content.xml ' ));//Color YAxis
87
- $ this ->assertEquals ('normal ' , $ pres ->getElementAttribute ($ element , 'fo:font-style ' , 'Object 1/content.xml ' ));//Italic YAxis
88
- $ this ->assertEquals ('16pt ' , $ pres ->getElementAttribute ($ element , 'fo:font-size ' , 'Object 1/content.xml ' ));//Size YAxis
89
- $ this ->assertEquals ('Arial ' , $ pres ->getElementAttribute ($ element , 'fo:font-family ' , 'Object 1/content.xml ' ));//Size YAxis
83
+ $ this ->assertTrue ($ oXMLDoc ->elementExists ($ element , 'Object 1/content.xml ' ));
84
+ $ this ->assertEquals ('#00FF00 ' , $ oXMLDoc ->getElementAttribute ($ element , 'fo:color ' , 'Object 1/content.xml ' ));//Color YAxis
85
+ $ this ->assertEquals ('normal ' , $ oXMLDoc ->getElementAttribute ($ element , 'fo:font-style ' , 'Object 1/content.xml ' ));//Italic YAxis
86
+ $ this ->assertEquals ('16pt ' , $ oXMLDoc ->getElementAttribute ($ element , 'fo:font-size ' , 'Object 1/content.xml ' ));//Size YAxis
87
+ $ this ->assertEquals ('Arial ' , $ oXMLDoc ->getElementAttribute ($ element , 'fo:font-family ' , 'Object 1/content.xml ' ));//Size YAxis
90
88
91
89
}
92
90
0 commit comments