From: Ævar Arnfjörð Bjarmason Date: Sun, 31 Dec 2006 09:18:54 +0000 (+0000) Subject: * Test cases for some includes/ stuff X-Git-Tag: 1.31.0-rc.0~54722 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=ace37bae5373bfdbb6a1be1d700883e27bd9f266;p=lhc%2Fweb%2Fwiklou.git * Test cases for some includes/ stuff --- diff --git a/t/00-test.t b/t/00-test.t new file mode 100644 index 0000000000..c3defa404a --- /dev/null +++ b/t/00-test.t @@ -0,0 +1,8 @@ +#!/usr/bin/env php + diff --git a/t/README b/t/README new file mode 100644 index 0000000000..3141f2c658 --- /dev/null +++ b/t/README @@ -0,0 +1,10 @@ +=head1 NAME + +F - MediaWiki test tree + +=head1 DESCRIPTION + +This is the MediaWiki test tree (well, one of them), tests here +produce TAP output, see L. + +=cut diff --git a/t/inc/IP.t b/t/inc/IP.t new file mode 100644 index 0000000000..85fe8cb634 --- /dev/null +++ b/t/inc/IP.t @@ -0,0 +1,60 @@ +#!/usr/bin/env php + \ No newline at end of file diff --git a/t/inc/Licenses.t b/t/inc/Licenses.t new file mode 100644 index 0000000000..86202bd670 --- /dev/null +++ b/t/inc/Licenses.t @@ -0,0 +1,29 @@ +#!/usr/bin/env php +html; + + + + +?> \ No newline at end of file diff --git a/t/inc/Sanitizer.t b/t/inc/Sanitizer.t new file mode 100644 index 0000000000..812cebc9d8 --- /dev/null +++ b/t/inc/Sanitizer.t @@ -0,0 +1,55 @@ +#!/usr/bin/env php +', + 'Opening element with no attributes' +); + +cmp_ok( + Xml::element( 'element', null, '' ), + '==', + '', + 'Terminated empty element' +); + +cmp_ok( + Xml::element( 'element', null, 'hello you & you' ), + '==', + 'hello <there> you & you', + 'Element with no attributes and content that needs escaping' +); + +cmp_ok( + Xml::element( 'element', array( 'key' => 'value', '<>' => '<>' ), null ), + '==', + '="<>">', + 'Element attributes, keys are not escaped' +); + +# +# open/close element +# + +cmp_ok( + Xml::openElement( 'element', array( 'k' => 'v' ) ), + '==', + '', + 'openElement() shortcut' +); + +cmp_ok( Xml::closeElement( 'element' ), '==', '', 'closeElement() shortcut' ); + +?> \ No newline at end of file