|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * This file is part of PHPPowerPoint - A pure PHP library for reading and writing |
| 4 | + * presentations documents. |
| 5 | + * |
| 6 | + * PHPPowerPoint is free software distributed under the terms of the GNU Lesser |
| 7 | + * General Public License version 3 as published by the Free Software Foundation. |
| 8 | + * |
| 9 | + * For the full copyright and license information, please read the LICENSE |
| 10 | + * file that was distributed with this source code. For the full list of |
| 11 | + * contributors, visit https://github.com/PHPOffice/PHPPowerPoint/contributors. |
| 12 | + * |
| 13 | + * @copyright 2009-2014 PHPPowerPoint contributors |
| 14 | + * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3 |
| 15 | + * @link https://github.com/PHPOffice/PHPPowerPoint |
| 16 | + */ |
| 17 | + |
| 18 | +namespace PhpOffice\PhpPowerpoint\Tests\Writer\PowerPoint2007; |
| 19 | + |
| 20 | +use PhpOffice\PhpPowerpoint\PhpPowerpoint; |
| 21 | +use PhpOffice\PhpPowerpoint\Shared\Drawing; |
| 22 | +use PhpOffice\PhpPowerpoint\Style\Alignment; |
| 23 | +use PhpOffice\PhpPowerpoint\Style\Bullet; |
| 24 | +use PhpOffice\PhpPowerpoint\Style\Color; |
| 25 | +use PhpOffice\PhpPowerpoint\Style\Fill; |
| 26 | +use PhpOffice\PhpPowerpoint\Tests\TestHelperDOCX; |
| 27 | +use PhpOffice\PhpPowerpoint\Writer\PowerPoint2007; |
| 28 | +use PhpOffice\PhpPowerpoint\Style\Border; |
| 29 | +use PhpOffice\PhpPowerpoint\Shape\Hyperlink; |
| 30 | +use PhpOffice\PhpPowerpoint\Writer\PowerPoint2007\Slide; |
| 31 | + |
| 32 | +/** |
| 33 | + * Test class for PowerPoint2007 |
| 34 | + * |
| 35 | + * @coversDefaultClass PowerPoint2007 |
| 36 | + */ |
| 37 | +class PptPropsTest extends \PHPUnit_Framework_TestCase |
| 38 | +{ |
| 39 | + /** |
| 40 | + * Executed before each method of the class |
| 41 | + */ |
| 42 | + public function tearDown() |
| 43 | + { |
| 44 | + TestHelperDOCX::clear(); |
| 45 | + } |
| 46 | + |
| 47 | + public function testPresProps() |
| 48 | + { |
| 49 | + $phpPowerPoint = new PhpPowerpoint(); |
| 50 | + |
| 51 | + $pres = TestHelperDOCX::getDocument($phpPowerPoint, 'PowerPoint2007'); |
| 52 | + $element = '/p:presentationPr/p:extLst/p:ext'; |
| 53 | + $this->assertTrue($pres->elementExists($element, 'ppt/presProps.xml')); |
| 54 | + $this->assertEquals('{E76CE94A-603C-4142-B9EB-6D1370010A27}', $pres->getElementAttribute($element, 'uri', 'ppt/presProps.xml')); |
| 55 | + } |
| 56 | + |
| 57 | + public function testTableStyles() |
| 58 | + { |
| 59 | + $phpPowerPoint = new PhpPowerpoint(); |
| 60 | + |
| 61 | + $pres = TestHelperDOCX::getDocument($phpPowerPoint, 'PowerPoint2007'); |
| 62 | + $element = '/a:tblStyleLst'; |
| 63 | + $this->assertTrue($pres->elementExists($element, 'ppt/tableStyles.xml')); |
| 64 | + $this->assertEquals('{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}', $pres->getElementAttribute($element, 'def', 'ppt/tableStyles.xml')); |
| 65 | + } |
| 66 | +} |
0 commit comments