public function testMarkAsFinal()
{
$oPhpPresentation = new PhpPresentation();
$pres = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
$this->assertFalse($pres->elementExists('/Properties/property[@name="_MarkAsFinal"]', 'docProps/custom.xml'));
$oPhpPresentation->getPresentationProperties()->markAsFinal(true);
$pres = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
$this->assertTrue($pres->elementExists('/Properties', 'docProps/custom.xml'));
$this->assertTrue($pres->elementExists('/Properties/property', 'docProps/custom.xml'));
$this->assertTrue($pres->elementExists('/Properties/property[@pid="2"][@fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"][@name="_MarkAsFinal"]', 'docProps/custom.xml'));
$this->assertTrue($pres->elementExists('/Properties/property[@pid="2"][@fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"][@name="_MarkAsFinal"]/vt:bool', 'docProps/custom.xml'));
$oPhpPresentation->getPresentationProperties()->markAsFinal(false);
$pres = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
$this->assertFalse($pres->elementExists('/Properties/property[@name="_MarkAsFinal"]', 'docProps/custom.xml'));
}