Exemple #1
0
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testSetDigestTypeThrowsOnInvalidValue()
 {
     $dataFile = new DataFileInfo();
     $dataFile->setDigestType('wrong type');
 }
Exemple #2
0
 protected function replaceDataFile($SignedDocData, $signedFile)
 {
     $data = simplexml_load_string($SignedDocData);
     // TODO check that the file is the same file
     $old = dom_import_simplexml($data->DataFile);
     $new = DataFileInfo::formXml($data->DataFile->asXml(), $signedFile)->getDomElement();
     $nodeImport = $old->ownerDocument->importNode($new, true);
     $old->parentNode->replaceChild($nodeImport, $old);
     return $data->asXML();
 }