assertFalse($object->isCommentVisible()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setCommentVisible('AAAA')); $this->assertFalse($object->isCommentVisible()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setCommentVisible(true)); $this->assertTrue($object->isCommentVisible()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setCommentVisible(false)); $this->assertFalse($object->isCommentVisible()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setCommentVisible()); $this->assertFalse($object->isCommentVisible()); } public function testLoopUntilEsc() { $object = new PresentationProperties(); $this->assertFalse($object->isLoopContinuouslyUntilEsc()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setLoopContinuouslyUntilEsc('AAAA')); $this->assertFalse($object->isLoopContinuouslyUntilEsc()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setLoopContinuouslyUntilEsc(true)); $this->assertTrue($object->isLoopContinuouslyUntilEsc()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setLoopContinuouslyUntilEsc(false)); $this->assertFalse($object->isLoopContinuouslyUntilEsc()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setLoopContinuouslyUntilEsc()); $this->assertFalse($object->isLoopContinuouslyUntilEsc()); } public function testLastView() { $object = new PresentationProperties(); $this->assertEquals(PresentationProperties::VIEW_SLIDE, $object->getLastView()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setLastView('AAAA')); $this->assertEquals(PresentationProperties::VIEW_SLIDE, $object->getLastView()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setLastView(PresentationProperties::VIEW_OUTLINE)); $this->assertEquals(PresentationProperties::VIEW_OUTLINE, $object->getLastView()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setLastView()); $this->assertEquals(PresentationProperties::VIEW_SLIDE, $object->getLastView()); } public function testMarkAsFinal() { $object = new PresentationProperties(); $this->assertFalse($object->isMarkedAsFinal()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->markAsFinal('AAAA')); $this->assertFalse($object->isMarkedAsFinal()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->markAsFinal(true)); $this->assertTrue($object->isMarkedAsFinal()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->markAsFinal(false)); $this->assertFalse($object->isMarkedAsFinal()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->markAsFinal()); $this->assertTrue($object->isMarkedAsFinal()); } public function testThumbnail() { $imagePath = PHPPRESENTATION_TESTS_BASE_DIR.DIRECTORY_SEPARATOR.'resources'.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'PhpPresentationLogo.png'; $object = new PresentationProperties(); $this->assertNull($object->getThumbnailPath()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setThumbnailPath('AAAA')); $this->assertNull($object->getThumbnailPath()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setThumbnailPath()); $this->assertNull($object->getThumbnailPath()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setThumbnailPath($imagePath)); $this->assertEquals($imagePath, $object->getThumbnailPath()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setThumbnailPath()); $this->assertEquals($imagePath, $object->getThumbnailPath()); } public function testZoom() { $object = new PresentationProperties(); $this->assertEquals(1, $object->getZoom()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setZoom('AAAA')); $this->assertEquals(1, $object->getZoom()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setZoom(2.3)); $this->assertEquals(2.3, $object->getZoom()); $this->assertInstanceOf('PhpOffice\\PhpPresentation\\PresentationProperties', $object->setZoom()); $this->assertEquals(1, $object->getZoom()); } }