Prepended constants with C_ to avoid reserved words as per https://www.php.net/manual...
[htmlpurifier/darkodev.git] / tests / HTMLPurifier / URIHarness.php
blob4577469c63b6fef06fda7604f299d9b4b8fe26ff
1 <?php
3 class HTMLPurifier_URIHarness extends HTMLPurifier_Harness
6 /**
7 * Prepares two URIs into object form
8 * @param &$uri Reference to string input URI
9 * @param &$expect_uri Reference to string expectation URI
10 * @note If $expect_uri is false, it will stay false
12 protected function prepareURI(&$uri, &$expect_uri)
14 $parser = new HTMLPurifier_URIParser();
15 if ($expect_uri === true) $expect_uri = $uri;
16 $uri = $parser->parse($uri);
17 if ($expect_uri !== false) {
18 $expect_uri = $parser->parse($expect_uri);
22 /**
23 * Generates a URI object from the corresponding string
25 protected function createURI($uri)
27 $parser = new HTMLPurifier_URIParser();
28 return $parser->parse($uri);
33 // vim: et sw=4 sts=4