PhpPresentation\Tests\Writer\PowerPoint2007\DocPropsCoreTest::testMarkAsFinal PHP Method

testMarkAsFinal() public method

public testMarkAsFinal ( )
    public function testMarkAsFinal()
    {
        $oPhpPresentation = new PhpPresentation();
        $pres = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
        $this->assertFalse($pres->elementExists('/cp:coreProperties/cp:contentStatus', 'docProps/core.xml'));
        $oPhpPresentation->getPresentationProperties()->markAsFinal(true);
        $pres = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
        $this->assertTrue($pres->elementExists('/cp:coreProperties/cp:contentStatus', 'docProps/core.xml'));
        $this->assertEquals('Final', $pres->getElement('/cp:coreProperties/cp:contentStatus', 'docProps/core.xml')->nodeValue);
        $oPhpPresentation->getPresentationProperties()->markAsFinal(false);
        $pres = TestHelperDOCX::getDocument($oPhpPresentation, 'PowerPoint2007');
        $this->assertFalse($pres->elementExists('/cp:coreProperties/cp:contentStatus', 'docProps/core.xml'));
    }