Fix newline issues in tests.
[htmlpurifier/darkodev.git] / tests / HTMLPurifier / URIHarness.php
blob2a2abb9175c72893f9f89311edea8e3c325c13dd
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);