Skip to content

Commit 844401b

Browse files
committed
Support for Visibility for slides (PHPUnit fixes)
1 parent e63d716 commit 844401b

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

tests/PhpPresentation/Tests/Writer/ODPresentation/ObjectsChartTest.php

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@ class ObjectsChartTest extends \PHPUnit_Framework_TestCase
4747
*/
4848
public function tearDown()
4949
{
50-
parent::tearDown();
5150
TestHelperDOCX::clear();
5251
}
5352

5453
public function testAxisFont()
5554
{
56-
57-
$phpPresentation = new PhpPresentation();
58-
$oSlide = $phpPresentation->getActiveSlide();
55+
$oPhpPresentation = new PhpPresentation();
56+
$oSlide = $oPhpPresentation->getActiveSlide();
5957
$oShape = $oSlide->createChartShape();
6058
$oSeries = new Series('Series', array('Jan' => 1, 'Feb' => 5, 'Mar' => 2));
6159
$oBar = new Bar();
@@ -68,25 +66,25 @@ public function testAxisFont()
6866
$oShape->getPlotArea()->getAxisY()->getFont()->setSize(16);
6967
$oShape->getPlotArea()->getAxisY()->getFont()->setName('Arial');
7068

71-
$pres = TestHelperDOCX::getDocument($phpPresentation, 'ODPresentation');
69+
$oXMLDoc = TestHelperDOCX::getDocument($oPhpPresentation, 'ODPresentation');
7270

7371
$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'));
7674

7775
$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
8381

8482
$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
9088

9189
}
9290

0 commit comments

Comments
 (0)