diff options
author | friendica <info@friendica.com> | 2012-07-18 03:59:10 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-18 03:59:10 -0700 |
commit | 22cf19e174bcee88b44968f2773d1bad2da2b54d (patch) | |
tree | f4e01db6f73754418438b020c2327e18c256653c /lib/htmlpurifier/tests/HTMLPurifier/PHPT | |
parent | 7a40f4354b32809af3d0cfd6e3af0eda02ab0e0a (diff) | |
download | volse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.tar.gz volse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.tar.bz2 volse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.zip |
bad sync with github windows client
Diffstat (limited to 'lib/htmlpurifier/tests/HTMLPurifier/PHPT')
22 files changed, 0 insertions, 366 deletions
diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/domxml.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/domxml.phpt deleted file mode 100644 index 406ac400b..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/domxml.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -DirectLex with domxml test ---SKIPIF-- -<?php -if (!extension_loaded('dom')) { - echo "skip - dom not available"; -} elseif (!extension_loaded('domxml')) { - echo "skip - domxml not loaded"; -} ---FILE-- -<?php -require '../library/HTMLPurifier.auto.php'; -echo get_class(HTMLPurifier_Lexer::create(HTMLPurifier_Config::createDefault())); ---EXPECT-- -HTMLPurifier_Lexer_DirectLex
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/func.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/func.phpt deleted file mode 100644 index d194d68d3..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/func.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -HTMLPurifier.func.php test ---FILE-- -<?php -require '../library/HTMLPurifier.auto.php'; -require 'HTMLPurifier.func.php'; -echo HTMLPurifier('<b>Salsa!'); ---EXPECT-- -<b>Salsa!</b>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/kses/basic.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/kses/basic.phpt deleted file mode 100644 index 8a9cd0162..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/kses/basic.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -HTMLPurifier.kses.php basic test ---FILE-- -<?php -require '../library/HTMLPurifier.kses.php'; -echo kses( - '<a class="foo" style="color:#F00;" href="https://google.com">Foo<i>Bar</i>', - array( - 'a' => array('class' => 1, 'href' => 1), - ), - array('http') // no https! -); - ---EXPECT-- -<a class="foo">FooBar</a>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/_autoload.inc b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/_autoload.inc deleted file mode 100644 index 42e3500e4..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/_autoload.inc +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -/** - * Tests if autoloading for HTML Purifier is enabled. If all tests pass, - * output is blank. - */ - -assert("!in_array(realpath('../library/HTMLPurifier/Filter/YouTube.php'), get_included_files())"); -new HTMLPurifier_Filter_YouTube(); -assert(" in_array(realpath('../library/HTMLPurifier.autoload.php'), get_included_files())"); - -// vim: et sw=4 sts=4 diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/_no-autoload.inc b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/_no-autoload.inc deleted file mode 100644 index fc109e727..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/_no-autoload.inc +++ /dev/null @@ -1,17 +0,0 @@ -<?php - -/** - * Tests if autoloading is off in HTML Purifier. If all tests pass, no output. - */ - -if (function_exists('spl_autoload_register')) { - $__v = spl_autoload_functions(); - assert('$__v == false || !in_array(array("HTMLPurifier_Bootstrap", "autoload"), $__v)'); -} else { - if (function_exists('__autoload')) { - $__r = new ReflectionFunction('__autoload'); - assert('$__r->getFileName() != realpath("../library/HTMLPurifier.autoload.php")'); - } -} - -// vim: et sw=4 sts=4 diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-includes.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-includes.phpt deleted file mode 100644 index 6a8f909b8..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-includes.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -HTMLPurifier.auto.php and HTMLPurifier.includes.php loading test ---FILE-- -<?php -require '../library/HTMLPurifier.path.php'; -require 'HTMLPurifier.includes.php'; -require 'HTMLPurifier/PHPT/loading/_no-autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!'); ---EXPECT-- -<b>Salsa!</b>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-with-autoload.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-with-autoload.phpt deleted file mode 100644 index aad437202..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-with-autoload.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -HTMLPurifier.auto.php using spl_autoload_register with __autoload() already defined loading test ---SKIPIF-- -<?php -if (!function_exists('spl_autoload_register')) { - echo "skip - spl_autoload_register() not available"; -} ---FILE-- -<?php -function __autoload($class) { - echo "Autoloading $class... -"; - eval("class $class {}"); -} - -require '../library/HTMLPurifier.auto.php'; -require 'HTMLPurifier/PHPT/loading/_autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!') . " -"; - -// purposely invoke older autoload -$bar = new Bar(); - ---EXPECT-- -<b>Salsa!</b> -Autoloading Bar...
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-with-spl-autoload-default.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-with-spl-autoload-default.phpt deleted file mode 100644 index a4011f1d3..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-with-spl-autoload-default.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -HTMLPurifier.auto.php using spl_autoload_register default ---SKIPIF-- -<?php -if (!function_exists('spl_autoload_register')) { - echo "skip - spl_autoload_register() not available"; -} ---FILE-- -<?php -spl_autoload_extensions(".php"); -spl_autoload_register(); - -require '../library/HTMLPurifier.auto.php'; -require 'HTMLPurifier/PHPT/loading/_autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!') . " -"; - -// purposely invoke standard autoload -$test = new default_load(); - ---EXPECT-- -<b>Salsa!</b> -Default loaded diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-with-spl-autoload.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-with-spl-autoload.phpt deleted file mode 100644 index 1697bb13f..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-with-spl-autoload.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -HTMLPurifier.auto.php using spl_autoload_register with user registration loading test ---SKIPIF-- -<?php -if (!function_exists('spl_autoload_register')) { - echo "skip - spl_autoload_register() not available"; -} ---FILE-- -<?php -function my_autoload($class) { - echo "Autoloading $class... -"; - eval("class $class {}"); - return true; -} -class MyClass { - public static function myAutoload($class) { - if ($class == 'Foo') { - echo "Special autoloading Foo... -"; - eval("class $class {}"); - } - } -} - -spl_autoload_register(array('MyClass', 'myAutoload')); -spl_autoload_register('my_autoload'); - -require '../library/HTMLPurifier.auto.php'; -require 'HTMLPurifier/PHPT/loading/_autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!') . " -"; - -// purposely invoke older autoloads -$foo = new Foo(); -$bar = new Bar(); - ---EXPECT-- -<b>Salsa!</b> -Special autoloading Foo... -Autoloading Bar...
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-without-spl-autoload.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-without-spl-autoload.phpt deleted file mode 100644 index aeee9dcee..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-without-spl-autoload.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -HTMLPurifier.auto.php without spl_autoload_register without userland autoload loading test ---SKIPIF-- -<?php -if (function_exists('spl_autoload_register')) { - echo "skip - spl_autoload_register() available"; -} ---FILE-- -<?php -assert("!function_exists('__autoload')"); -require '../library/HTMLPurifier.auto.php'; -require 'HTMLPurifier/PHPT/loading/_autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!') . " -"; - ---EXPECT-- -<b>Salsa!</b>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-without-spl-with-autoload.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-without-spl-with-autoload.phpt deleted file mode 100644 index 2b6f49d8c..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto-without-spl-with-autoload.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -HTMLPurifier.auto.php without spl_autoload_register but with userland -__autoload() defined test ---SKIPIF-- -<?php -if (function_exists('spl_autoload_register')) { - echo "skip - spl_autoload_register() available"; -} ---FILE-- -<?php -function __autoload($class) { - echo "Autoloading $class... -"; - eval("class $class {}"); -} -require '../library/HTMLPurifier.auto.php'; -require 'HTMLPurifier/PHPT/loading/_no-autoload.inc'; -$purifier = new HTMLPurifier(); - ---EXPECT-- -Autoloading HTMLPurifier...
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto.phpt deleted file mode 100644 index a4ea716f9..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/auto.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -HTMLPurifier.auto.php loading test ---FILE-- -<?php -require '../library/HTMLPurifier.auto.php'; -require 'HTMLPurifier/PHPT/loading/_autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!'); ---EXPECT-- -<b>Salsa!</b>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/error-auto-with-spl-nonstatic-autoload.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/error-auto-with-spl-nonstatic-autoload.phpt deleted file mode 100644 index 9a91abaf8..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/error-auto-with-spl-nonstatic-autoload.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -Error when registering autoload with non-static autoload already on SPL stack ---SKIPIF-- -<?php -if (!function_exists('spl_autoload_register')) { - echo "skip - spl_autoload_register() not available"; -} -if (version_compare(PHP_VERSION, '5.2.11', '>=')) { - echo "skip - non-buggy version of PHP"; -} ---FILE-- -<?php -class NotStatic -{ - public function autoload($class) { - echo "Autoloading... $class" . PHP_EOL; - eval("class $class {}"); - } -} - -$obj = new NotStatic(); -spl_autoload_register(array($obj, 'autoload')); - -try { - require '../library/HTMLPurifier.auto.php'; -} catch (Exception $e) { - echo 'Caught error gracefully'; - assert('strpos($e->getMessage(), "44144") !== false'); -} - ---EXPECT-- -Caught error gracefully diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/path-includes-autoload.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/path-includes-autoload.phpt deleted file mode 100644 index 6120956c6..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/path-includes-autoload.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -HTMLPurifier.path.php, HTMLPurifier.includes.php and HTMLPurifier.autoload.php loading test ---FILE-- -<?php -require '../library/HTMLPurifier.path.php'; -require 'HTMLPurifier.includes.php'; -require 'HTMLPurifier.autoload.php'; -require 'HTMLPurifier/PHPT/loading/_autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!'); - ---EXPECT-- -<b>Salsa!</b>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/path-includes.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/path-includes.phpt deleted file mode 100644 index 681d51a96..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/path-includes.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -HTMLPurifier.path.php and HTMLPurifier.includes.php loading test ---FILE-- -<?php -require '../library/HTMLPurifier.path.php'; -require 'HTMLPurifier.includes.php'; -require 'HTMLPurifier/PHPT/loading/_no-autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!'); ---EXPECT-- -<b>Salsa!</b>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/safe-includes.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/safe-includes.phpt deleted file mode 100644 index cb6f95d53..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/safe-includes.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -HTMLPurifier.safe-includes.php loading test ---FILE-- -<?php -require_once '../library/HTMLPurifier.php'; // Tests for require_once -require_once '../library/HTMLPurifier.safe-includes.php'; -require 'HTMLPurifier/PHPT/loading/_no-autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!'); ---EXPECT-- -<b>Salsa!</b>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/standalone-autoload.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/standalone-autoload.phpt deleted file mode 100644 index 36bb2efd7..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/standalone-autoload.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -HTMLPurifier.standalone.php loading test ---FILE-- -<?php -require '../library/HTMLPurifier.standalone.php'; -require '../library/HTMLPurifier.autoload.php'; -require 'HTMLPurifier/PHPT/loading/_autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!'); ---EXPECT-- -<b>Salsa!</b>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/standalone-with-prefix.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/standalone-with-prefix.phpt deleted file mode 100644 index 721dd7d17..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/standalone-with-prefix.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -HTMLPurifier.standalone.php with HTMLPURIFIER_PREFIX loading test ---FILE-- -<?php -define('HTMLPURIFIER_PREFIX', realpath('../library')); -require '../library/HTMLPurifier.path.php'; -require 'HTMLPurifier.standalone.php'; -require 'HTMLPurifier/Filter/YouTube.php'; -require 'HTMLPurifier/PHPT/loading/_no-autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!'); -assert('in_array(realpath("../library/HTMLPurifier/Filter/YouTube.php"), get_included_files())'); ---EXPECT-- -<b>Salsa!</b>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/standalone.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/standalone.phpt deleted file mode 100644 index a4fe4f77d..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/loading/standalone.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -HTMLPurifier.standalone.php loading test ---FILE-- -<?php -require '../library/HTMLPurifier.standalone.php'; -require 'HTMLPurifier/Filter/YouTube.php'; -require 'HTMLPurifier/PHPT/loading/_no-autoload.inc'; -$config = HTMLPurifier_Config::createDefault(); -$purifier = new HTMLPurifier($config); -echo $purifier->purify('<b>Salsa!'); -assert('in_array(realpath("../library/standalone/HTMLPurifier/Filter/YouTube.php"), get_included_files())'); ---EXPECT-- -<b>Salsa!</b>
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/stub.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/stub.phpt deleted file mode 100644 index e919c5763..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/stub.phpt +++ /dev/null @@ -1,6 +0,0 @@ ---TEST-- -PHPT testing framework smoketest ---FILE-- -Foobar ---EXPECT-- -Foobar
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/utf8.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/utf8.phpt deleted file mode 100644 index 87c20ef66..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/utf8.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -UTF-8 smoketest ---FILE-- -<?php -require '../library/HTMLPurifier.auto.php'; -$purifier = new HTMLPurifier(); -echo $purifier->purify('太極拳, ЊЎЖ, لمنس'); ---EXPECT-- -太極拳, ЊЎЖ, لمنس
\ No newline at end of file diff --git a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/ze1_compatibility_mode.phpt b/lib/htmlpurifier/tests/HTMLPurifier/PHPT/ze1_compatibility_mode.phpt deleted file mode 100644 index 606d7592e..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/PHPT/ze1_compatibility_mode.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -Error with zend.ze1_compatibility_mode test ---PRESKIPIF-- -<?php -if (version_compare(PHP_VERSION, '5.3.0') >= 0) { - echo 'skip - ze1_compatibility_mode not present in PHP 5.3 or later'; -} ---INI-- -zend.ze1_compatibility_mode = 1 ---FILE-- -<?php -require '../library/HTMLPurifier.auto.php'; ---EXPECTF-- -Fatal error: HTML Purifier is not compatible with zend.ze1_compatibility_mode; please turn it off in %s |