PptPresP 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace PhpPresentation\Tests\Writer\PowerPoint2007;
  3. use PhpOffice\PhpPresentation\Tests\PhpPresentationTestCase;
  4. class PptPresPropsTest extends PhpPresentationTestCase
  5. {
  6. protected $writerName = 'PowerPoint2007';
  7. public function testRender()
  8. {
  9. $this->assertZipFileExists('ppt/presProps.xml');
  10. $element = '/p:presentationPr/p:extLst/p:ext';
  11. $this->assertZipXmlElementExists('ppt/presProps.xml', $element);
  12. $this->assertZipXmlAttributeEquals('ppt/presProps.xml', $element, 'uri', '{E76CE94A-603C-4142-B9EB-6D1370010A27}');
  13. }
  14. public function testLoopContinuously()
  15. {
  16. $this->assertZipFileExists('ppt/presProps.xml');
  17. $element = '/p:presentationPr/p:showPr';
  18. $this->assertZipXmlElementNotExists('ppt/presProps.xml', $element);
  19. $this->oPresentation->getPresentationProperties()->setLoopContinuouslyUntilEsc(true);
  20. $this->resetPresentationFile();
  21. $this->assertZipFileExists('ppt/presProps.xml');
  22. $element = '/p:presentationPr/p:showPr';
  23. $this->assertZipXmlElementExists('ppt/presProps.xml', $element);
  24. $this->assertZipXmlAttributeExists('ppt/presProps.xml', $element, 'loop');
  25. $this->assertZipXmlAttributeEquals('ppt/presProps.xml', $element, 'loop', 1);
  26. }
  27. }