/** * Test document protection */ public function testDocumentProtection() { $phpWord = new PhpWord(); $phpWord->getProtection()->setEditing('forms'); $doc = TestHelperDOCX::getDocument($phpWord); $file = 'word/settings.xml'; $path = '/w:settings/w:documentProtection'; $this->assertTrue($doc->elementExists($path, $file)); }