summaryrefslogtreecommitdiff
path: root/tests/html.t
diff options
context:
space:
mode:
authorUrban Müller2007-07-26 13:02:24 +0000
committerUrban Müller2007-07-26 13:02:24 +0000
commit806a5297e7e99d455b97a4f0acaba2f40f470584 (patch)
treeb9fc43ef227da87d873cf3676c08c49fa0dc1240 /tests/html.t
parentc3cba034c8009b65c25dd4ef5f54b18d9c8ee7d4 (diff)
downloaditools-806a5297e7e99d455b97a4f0acaba2f40f470584.tar.gz
itools-806a5297e7e99d455b97a4f0acaba2f40f470584.tar.bz2
itools-806a5297e7e99d455b97a4f0acaba2f40f470584.zip
renamed files for autoloader
Diffstat (limited to 'tests/html.t')
-rwxr-xr-xtests/html.t99
1 files changed, 0 insertions, 99 deletions
diff --git a/tests/html.t b/tests/html.t
deleted file mode 100755
index 965e4a1..0000000
--- a/tests/html.t
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/www/server/bin/php -qC
-<?php
-
-# Tests for html.class
-
-require 'searchlib/search_test.class';
-
-# Traditional html generation
-new it_html('htmltype' => "html");
-
-is(
- a('href' => "&foo", 'true' => true, 'false' => false, 'null' => null, 'empty' => "", "bar"),
- '<a href="&amp;foo" true empty="">bar</a>',
- "tag with attributes"
-);
-
-is(
- div(),
- "<div></div>\n",
- "empty script tag"
-);
-
-is(
- img('src' => "foo.png"),
- '<img src="foo.png">',
- "empty link tag"
-);
-
-is(
- tag('link'),
- "<link>\n",
- "empty link tag"
-);
-
-is(
- tag('link', "foo"),
- "<link>foo</link>\n",
- "link tag with data"
-);
-
-# XML generation
-unset($GLOBALS['it_html']);
-new it_html('htmltype' => "xhtml", 'tags' => "xmltest");
-
-is(
- xmltest(),
- "<xmltest />\n",
- "empty xmltest tag"
-);
-
-is(
- xmltest("foo"),
- "<xmltest>foo</xmltest>\n",
- "empty xmltest tag"
-);
-
-is(
- xmltest('href' => "&foo", 'true' => true, 'false' => false, 'null' => null, 'empty' => ""),
- '<xmltest href="&amp;foo" true="true" empty="" />' . "\n",
- "xmltest tag with attributes"
-);
-
-# Inheriting and extending it_html
-class myhtml extends it_html
-{
-function myimg($args)
-{
- array_unshift($args, 'alt' => "ALT", 'bar' => "BAR");
-
- return parent::img($args);
-}
-}
-
-unset($GLOBALS['it_html']);
-new myhtml('htmltype' => "html");
-
-is(
- myimg('src' => "foo.gif", 'alt' => "foo"),
- '<img alt="foo" bar="BAR" src="foo.gif">',
- "it_html inheritance"
-);
-
-is(
- it_html::sanitize(' <p><a href="http://www.flickr.com/people/swisspics/">swisspics</a> posted < &lt; &auml; &amp; yesterday <b>a <i>photo</i></b> <b><i>tag missmatch</b></i>:</p><br><br />
-
-<p><a href="javascript:window.close()" title="Wolken"><img src="http://farm1.static.flickr.com/177/377214376_bcba167a7d_m.jpg" width="240" height="180" alt="Wolken" style="border: 1px solid #ddd;" /></a></p>
-'),
- ' <a href="http://www.flickr.com/people/swisspics/">swisspics</a> posted &lt; &lt; ä &amp; yesterday a <i>photo</i> <i>tag missmatch</i>:<br /><br /> <p><img src="http://farm1.static.flickr.com/177/377214376_bcba167a7d_m.jpg" alt="" /></p> ',
- 'it_html::sanitize tag soup'
-);
-
-is(
- U("/foo.html", 'bar' => array('gna' => 42, 'qux' => array('quux' => "<Zürich>", 'gnöp' => "fasel"))),
- '/foo.html?bar[gna]=42&bar[qux][quux]=%3CZ%FCrich%3E&bar[qux][gn%F6p]=fasel',
- 'U() with nested arrays'
-);
-
-
-?>