PHP Classes

File: web/SSO/vendor/simplesamlphp/xmlseclibs/tests/withcomment-empty-uri.phpt

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/SSO/vendor/simplesamlphp/xmlseclibs/tests/withcomment-empty-uri.phpt   Download  
File: web/SSO/vendor/simplesamlphp/xmlseclibs/tests/withcomment-empty-uri.phpt
Role: Example script
Content type: text/plain
Description: Example script
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 719 bytes
 

Contents

Class file image Download
--TEST--
WithComments with empty URI.
--DESCRIPTION--
Checks that comments are removed when using an empty URI in a Reference.
--FILE--
<?php
require(dirname(__FILE__) . '/../xmlseclibs.php');

$doc = new DOMDocument();
$doc->load(dirname(__FILE__) . '/withcomment-empty-uri.xml');

$objXMLSecDSig = new XMLSecurityDSig();

$objDSig = $objXMLSecDSig->locateSignature($doc);
if (!
$objDSig) {
    throw new
Exception("Cannot locate Signature Node");
}

$retVal = $objXMLSecDSig->validateReference();
if (!
$retVal) {
    throw new
Exception("Reference Validation Failed");
}

/*
 * Since we are testing reference canonicalization, we don't need to
 * do more than reference validation here.
 */
echo "OK\n";
?>
--EXPECTF--
OK