Comment for bug that needs to get fixed.
[htmlpurifier.git] / tests / HTMLPurifier / URIHarness.php
blob852460a85a71fd33cf3887eed563dc24c2330d82
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) {
13 $parser = new HTMLPurifier_URIParser();
14 if ($expect_uri === true) $expect_uri = $uri;
15 $uri = $parser->parse($uri);
16 if ($expect_uri !== false) {
17 $expect_uri = $parser->parse($expect_uri);
21 /**
22 * Generates a URI object from the corresponding string
24 protected function createURI($uri) {
25 $parser = new HTMLPurifier_URIParser();
26 return $parser->parse($uri);
31 // vim: et sw=4 sts=4