[evolvis-commits] r15607: Update wiki tests
mirabilos at evolvis.org
mirabilos at evolvis.org
Tue Mar 1 00:18:25 CET 2011
Author: mirabilos
Date: 2011-03-01 00:18:25 +0100 (Tue, 01 Mar 2011)
New Revision: 15607
Added:
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/AtomParserTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AtomFeedTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/atom-example.xml
Modified:
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/CompatInfo.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/DumpHtml.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/HtmlParserTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/InlineParserTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/PageListTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/SetupWiki.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/TextSearchTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/XmlRpcTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AllPagesTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AllUsersTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/IncludePageTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/ListPagesTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/OrphanedPagesTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/WantedPagesTest.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/pcre-crash.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/runme_all
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/test.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit_test_backend_cvs.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/interop-client.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/interop-server.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/validate-form.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/validate.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-client.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-introspect.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-servers.php
trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc_utils.php
Log:
Update wiki tests
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/CompatInfo.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/CompatInfo.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/CompatInfo.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -2,28 +2,27 @@
/* Get the Compatibility info for phpwiki
http://pear.php.net/package/PHP_CompatInfo
- $Id: CompatInfo.php 6206 2008-08-26 15:20:22Z vargenau $
+ $Id: CompatInfo.php 7638 2010-08-11 11:58:40Z vargenau $
*/
/*
* Copyright (C) 2004 Reini Urban <rurban at x-ray.at>
*
* This file is part of PhpWiki.
- *
+ *
* PhpWiki is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* PhpWiki is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with PhpWiki; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
require_once 'PHP/CompatInfo.php';
@@ -36,8 +35,8 @@
if (!empty($file) and substr($file,0,3) != '<b>' and $file != 'File') {
$row[0] = '<a href="'.$PHP_SELF.'?file='.urlencode($file).'">'.$file.'</a>';
}
- foreach ($row as $r) {
- echo "<$tag>", empty($r) ? ' ' : "$r", "</$tag>";
+ foreach ($row as $r) {
+ echo "<$tag>", empty($r) ? ' ' : "$r", "</$tag>";
}
echo "</tr>\n";
}
@@ -103,7 +102,7 @@
$const = array_shift($info['constants']);
}
out_row(array($file, $info['version'], $ext, $const));
-
+
if (is_array($info['extensions'])
and sizeof($info['extensions']) >= sizeof($info['constants'])) {
foreach ($info['extensions'] as $i => $ext) {
@@ -153,22 +152,11 @@
echo "</pre>\n";
}
-// $Log: not supported by cvs2svn $
-// Revision 1.2 2004/08/24 00:27:29 rurban
-// Turn recursion on
-//
-// Revision 1.1 2004/08/24 00:21:57 rurban
-// Print the PHP compatibility info for phpwiki.
-// per file and per project,
-// (which function is dependend on which php version?)
-//
-
-// (c-file-style: "gnu")
// Local Variables:
// mode: php
// tab-width: 8
// c-basic-offset: 4
// c-hanging-comment-ender-p: nil
// indent-tabs-mode: nil
-// End:
-?>
\ No newline at end of file
+// End:
+?>
Added: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/AtomParserTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/AtomParserTest.php (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/AtomParserTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -0,0 +1,220 @@
+<?php
+// $Id: AtomParserTest.php 7466 2010-06-07 08:12:29Z rurban $
+/*
+ * Copyright 2010 Sébastien Le Callonnec
+ *
+ * This file is part of PhpWiki.
+ *
+ * PhpWiki is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PhpWiki is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with PhpWiki; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+/**
+ * @author: Sébastien Le Callonnec
+ */
+require_once('lib/AtomParser.php');
+require_once('PHPUnit/Framework.php');
+
+class AtomParserTest
+extends phpwiki_TestCase
+{
+ function testSimpleAtomFileParsing() {
+ $fake_atom_file = <<<ATOM
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom"
+ xmlns:georss="http://www.georss.org/georss" >
+ <link href="http://www.phpwiki.org/fakeurl" rel="self" type="application/atom+xml" />
+ <title>This is a fake feed</title>
+ <updated>2010-05-15T01:00:00Z</updated>
+ <id>http://www.phpwiki.org/fakeurl</id>
+ <subtitle>Cool feed</subtitle>
+ <author>
+ <name>Sébastien Le Callonnec</name>
+ <email>slc_ie at yahoo.ie</email>
+ </author>
+
+ <entry>
+ <title>Foobar Éire</title>
+ <link href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8"/>
+ <content type="xhtml">
+ <div xmlns="http://www.w3.org/1999/xhtml">Millenium Spire, Dublin
+ <div class="geo">Geo coordinates:
+ <abbr class="latitude" title="53.349441">53.349441</abbr>
+ <abbr class="longitude" title="-6.260282">-6.260282</abbr>
+ </div>
+ </div>
+ </content>
+ <updated>2010-05-15T01:00:00Z</updated>
+ <published>2010-05-15T01:00:00Z</published>
+ <georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
+ <id>tag:www.phpwiki.org,2010-05-15:/fakeurl/20100515223621</id>
+ </entry>
+
+</feed>
+ATOM;
+ $parser = new AtomParser();
+ $parser->parse($fake_atom_file);
+
+ $this->assertFalse(count($parser->feed) == 0);
+
+ $current_feed = $parser->feed[0];
+ $this->assertEquals("This is a fake feed", $current_feed["title"]);
+
+ $this->assertFalse(count($current_feed["links"]) == 0);
+ $this->assertEquals("http://www.phpwiki.org/fakeurl", $current_feed["links"][0]["href"]);
+ $this->assertEquals("Cool feed", $current_feed["subtitle"]);
+ $this->assertEquals("2010-05-15T01:00:00Z", $current_feed["updated"]);
+
+ $this->assertFalse(count($current_feed["authors"]) == 0);
+
+ $current_author = $current_feed["authors"][0];
+ $this->assertEquals("Sébastien Le Callonnec", $current_author["name"]);
+ $this->assertEquals("slc_ie at yahoo.ie", $current_author["email"]);
+
+ $this->assertFalse(count($parser->entries) == 0);
+
+ $current_entry = $parser->entries[0];
+ $this->assertEquals("Foobar Éire", $current_entry["title"]);
+ $this->assertEquals("http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8", $current_entry["links"][0]["href"]);
+ $this->assertEquals("2010-05-15T01:00:00Z", $current_entry["updated"]);
+ $this->assertEquals("2010-05-15T01:00:00Z", $current_entry["published"]);
+ $this->assertEquals("tag:www.phpwiki.org,2010-05-15:/fakeurl/20100515223621", $current_entry["id"]);
+
+ $payload =<<<CONTENT
+<div xmlns="http://www.w3.org/1999/xhtml">Millenium Spire, Dublin
+ <div class="geo">Geo coordinates:
+ <abbr class="latitude" title="53.349441">53.349441</abbr>
+ <abbr class="longitude" title="-6.260282">-6.260282</abbr>
+ </div>
+ </div>
+CONTENT;
+ $this->assertEquals($payload, $current_entry["content"]);
+ }
+
+ function testExtensiveAtomExampleFromRFC4287() {
+ $fake_atom_file = <<<ATOM
+<?xml version="1.0" encoding="utf-8"?>
+
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title type="text">dive into mark</title>
+ <subtitle type="html">
+ A <em>lot</em> of effort
+ went into making this effortless
+ </subtitle>
+
+ <updated>2005-07-31T12:29:29Z</updated>
+ <id>tag:example.org,2003:3</id>
+ <link rel="alternate" type="text/html"
+ hreflang="en" href="http://example.org/"/>
+ <link rel="self" type="application/atom+xml"
+ href="http://example.org/feed.atom"/>
+ <rights>Copyright (c) 2003, Mark Pilgrim</rights>
+
+ <generator uri="http://www.example.com/" version="1.0">
+ Example Toolkit
+ </generator>
+ <entry>
+ <title>Atom draft-07 snapshot</title>
+ <link rel="alternate" type="text/html"
+ href="http://example.org/2005/04/02/atom"/>
+
+ <link rel="enclosure" type="audio/mpeg" length="1337"
+ href="http://example.org/audio/ph34r_my_podcast.mp3"/>
+ <id>tag:example.org,2003:3.2397</id>
+ <updated>2005-07-31T12:29:29Z</updated>
+ <published>2003-12-13T08:29:29-04:00</published>
+
+ <author>
+ <name>Mark Pilgrim</name>
+ <uri>http://example.org/</uri>
+ <email>f8dy at example.com</email>
+
+ </author>
+ <contributor>
+ <name>Sam Ruby</name>
+ </contributor>
+ <contributor>
+
+ <name>Joe Gregorio</name>
+ </contributor>
+ <content type="xhtml" xml:lang="en"
+ xml:base="http://diveintomark.org/">
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ <p><i>[Update: The Atom draft is finished.]</i></p>
+
+ </div>
+ </content>
+ </entry>
+</feed>
+ATOM;
+ $parser = new AtomParser();
+ $parser->parse($fake_atom_file);
+
+ $this->assertFalse(count($parser->feed) == 0);
+
+ $current_feed = $parser->feed[0];
+ $this->assertEquals("dive into mark", $current_feed["title"]);
+ $this->assertEquals("Copyright (c) 2003, Mark Pilgrim", $current_feed["rights"]);
+ $this->assertEquals("A <em>lot</em> of effort\n went into making this effortless", $current_feed["subtitle"]);
+ $this->assertEquals("2005-07-31T12:29:29Z", $current_feed["updated"]);
+ $this->assertEquals("tag:example.org,2003:3", $current_feed["id"]);
+ $this->assertEquals("Example Toolkit", $current_feed["generator"]);
+
+ $this->assertTrue(count($current_feed["authors"]) == 0);
+ $this->assertTrue(count($current_feed["contributors"]) == 0);
+
+
+ $this->assertFalse(count($parser->entries) == 0);
+
+ $current_entry = $parser->entries[0];
+ $this->assertEquals("Atom draft-07 snapshot", $current_entry["title"]);
+ $this->assertEquals("2005-07-31T12:29:29Z", $current_entry["updated"]);
+ $this->assertEquals("2003-12-13T08:29:29-04:00", $current_entry["published"]);
+ $this->assertEquals("tag:example.org,2003:3.2397", $current_entry["id"]);
+ $this->assertEquals(2, count($current_entry["links"]));
+
+ $this->assertTrue(count($current_entry["authors"]) == 1);
+ $this->assertTrue(count($current_entry["contributors"]) == 2);
+
+ $current_author = $current_entry["authors"][0];
+ $this->assertEquals("Mark Pilgrim", $current_author["name"]);
+ $this->assertEquals("f8dy at example.com", $current_author["email"]);
+
+ $first_contributor = $current_entry["contributors"][0];
+ $second_contributor = $current_entry["contributors"][1];
+
+ $this->assertEquals("Sam Ruby", $first_contributor["name"]);
+ $this->assertEquals("Joe Gregorio", $second_contributor["name"]);
+
+ $first_link = $current_entry["links"][0];
+ $this->assertEquals("alternate", $first_link["rel"]);
+ $this->assertEquals("text/html", $first_link["type"]);
+ $this->assertEquals("http://example.org/2005/04/02/atom", $first_link["href"]);
+
+ $second_link = $current_entry["links"][1];
+ $this->assertEquals("enclosure", $second_link["rel"]);
+ $this->assertEquals("audio/mpeg", $second_link["type"]);
+ $this->assertEquals("1337", $second_link["length"]);
+ $this->assertEquals("http://example.org/audio/ph34r_my_podcast.mp3", $second_link["href"]);
+
+ $payload = <<<CONTENT
+<div xmlns="http://www.w3.org/1999/xhtml">
+ <p><i>[Update: The Atom draft is finished.]</i></p>
+
+ </div>
+CONTENT;
+
+ $this->assertEquals($payload, $current_entry["content"]);
+ }
+}
+?>
\ No newline at end of file
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/DumpHtml.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/DumpHtml.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/DumpHtml.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: DumpHtml.php 7181 2009-10-05 14:25:48Z vargenau $
/**
* 2nd important test:
* Check if all standard pages can be rendered (dumped)
@@ -51,4 +51,4 @@
}
-?>
\ No newline at end of file
+?>
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/HtmlParserTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/HtmlParserTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/HtmlParserTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,5 +1,5 @@
<?php
-rcs_id('$Id: HtmlParserTest.php 6208 2008-08-26 15:25:38Z vargenau $');
+// rcs_id('$Id: HtmlParserTest.php 7638 2010-08-11 11:58:40Z vargenau $');
/* Copyright (C) 2004, Reini Urban <rurban at x-ray.at>
*/
@@ -20,7 +20,7 @@
"<HR>" => "----",
"<DT><DD>Indent</DD></DT>" => ";:Indent",
"<NOWIKI>nowiki</NOWIKI>" => "<verbatim>\nnowiki\n</verbatim>",
- "<DL><DT> Def </DT><DD> List</DD></DL>" => "; Def : List",
+ "<DL><DT> Def </DT><DD> List</DD></DL>" => "; Def : List",
);
if (USE_GLOBAL_SAX)
$parser = new HtmlParser("PhpWiki2"); // will not work!
@@ -38,16 +38,14 @@
$parser->__destruct();
}
}
-
+
}
-
-// (c-file-style: "gnu")
// Local Variables:
// mode: php
// tab-width: 8
// c-basic-offset: 4
// c-hanging-comment-ender-p: nil
// indent-tabs-mode: nil
-// End:
+// End:
?>
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/InlineParserTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/InlineParserTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/InlineParserTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,5 +1,5 @@
<?php
-rcs_id('$Id: InlineParserTest.php 6208 2008-08-26 15:25:38Z vargenau $');
+// rcs_id('$Id: InlineParserTest.php 7638 2010-08-11 11:58:40Z vargenau $');
/* Copyright (C) 2004 Dan Frankowski <dfrankow at cs.umn.edu>
* (C) 2006, 2007 Reini Urban <rurban at x-ray.at>
@@ -9,7 +9,7 @@
require_once 'PHPUnit.php';
class InlineParserTest extends phpwiki_TestCase {
-
+
function _tests() {
$uplink = getUploadDataPath().'/image.jpg';
// last update: 1.3.13
@@ -52,14 +52,14 @@
call_user_func(array(&$this, $this->_name));
}
}
-
+
function testNoWikiWords() {
$str1 = 'This has no wiki words, and is all text.';
$xmlc1 = TransformInline($str1);
$this->assertTrue(isa($xmlc1, 'XmlContent'));
$c1 = $xmlc1->getContent();
- $this->assertEquals(1, count($c1));
- $this->assertEquals($str1, $c1[0]);
+ $this->assertEquals(1, count($c1));
+ $this->assertEquals($str1, $c1[0]);
}
function testWikiWord() {
@@ -69,18 +69,18 @@
$this->assertTrue(isa($xml, 'XmlContent'));
$c1 = $xml->getContent();
$this->assertEquals(3, count($c1));
- $this->assertTrue(isa($c1[1], 'Cached_WikiLink'));
+ $this->assertTrue(isa($c1[1], 'Cached_WikiLink'));
- $this->assertEquals('This has 1 ', $c1[0]);
- $this->assertEquals($ww, $c1[1]->asString());
- $this->assertEquals('.', $c1[2]);
+ $this->assertEquals('This has 1 ', $c1[0]);
+ $this->assertEquals($ww, $c1[1]->asString());
+ $this->assertEquals('.', $c1[2]);
}
-
+
function _testLink($wiki, $expected = null) {
if (is_null($expected)) {
$ta = $this->_tests();
$expected = $ta[$wiki];
- }
+ }
$xml = TransformInline($wiki);
$this->assertTrue(isa($xml, 'XmlContent'));
$expectobj = unserialize($expected);
@@ -95,12 +95,11 @@
$GLOBALS['suite']->addTest(new InlineParserTest($name));
}
-// (c-file-style: "gnu")
// Local Variables:
// mode: php
// tab-width: 8
// c-basic-offset: 4
// c-hanging-comment-ender-p: nil
// indent-tabs-mode: nil
-// End:
+// End:
?>
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/PageListTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/PageListTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/PageListTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: PageListTest.php 7181 2009-10-05 14:25:48Z vargenau $
require_once 'lib/PageList.php';
require_once 'PHPUnit.php';
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/SetupWiki.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/SetupWiki.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/SetupWiki.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: SetupWiki.php 7508 2010-06-09 10:34:03Z rurban $
/**
* 1st important test: Check if all pgsrc files import without failure
*/
@@ -22,9 +22,11 @@
}
/* PCRE memory problem (crash) with such big pages and anchored blocks */
+ /*
+ // Broken since r.7418
function testOldMarkupTestPage() {
$this->_loadPage('Help/OldMarkupTestPage');
- }
+ }*/
/* ADODB set_links _id_cache error: IncludePagePlugin => HomePage */
function testIncludePagePlugin() {
@@ -50,4 +52,4 @@
}
}
-?>
\ No newline at end of file
+?>
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/TextSearchTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/TextSearchTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/TextSearchTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: TextSearchTest.php 7181 2009-10-05 14:25:48Z vargenau $
require_once 'lib/TextSearchQuery.php';
require_once 'PHPUnit.php';
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/XmlRpcTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/XmlRpcTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/XmlRpcTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,5 +1,5 @@
<?php
-rcs_id('$Id: XmlRpcTest.php 6208 2008-08-26 15:25:38Z vargenau $');
+// rcs_id('$Id: XmlRpcTest.php 7638 2010-08-11 11:58:40Z vargenau $');
/* Copyright (C) 2007 Reini Urban
*/
@@ -49,12 +49,11 @@
*/
}
-// (c-file-style: "gnu")
// Local Variables:
// mode: php
// tab-width: 8
// c-basic-offset: 4
// c-hanging-comment-ender-p: nil
// indent-tabs-mode: nil
-// End:
-?>
\ No newline at end of file
+// End:
+?>
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AllPagesTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AllPagesTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AllPagesTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: AllPagesTest.php 7181 2009-10-05 14:25:48Z vargenau $
require_once 'lib/WikiPlugin.php';
require_once 'lib/plugin/AllPages.php';
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AllUsersTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AllUsersTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AllUsersTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: AllUsersTest.php 7181 2009-10-05 14:25:48Z vargenau $
require_once 'lib/WikiPlugin.php';
require_once 'lib/plugin/AllUsers.php';
Added: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AtomFeedTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AtomFeedTest.php (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/AtomFeedTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -0,0 +1,80 @@
+<?php
+// $Id: AtomFeedTest.php 7466 2010-06-07 08:12:29Z rurban $
+/*
+ * Copyright 2010 Sébastien Le Callonnec
+ *
+ * This file is part of PhpWiki.
+ *
+ * PhpWiki is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PhpWiki is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with PhpWiki; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+/**
+ * @author: Sébastien Le Callonnec
+ */
+require_once('lib/plugin/AtomFeed.php');
+require_once('lib/AtomParser.php');
+require_once('lib/HtmlElement.php');
+
+class AtomFeedTest
+extends phpwiki_TestCase
+{
+ var $atom_feed_plugin;
+
+ public function setUp() {
+ parent::setUp();
+ $this->atom_feed_plugin = new WikiPlugin_AtomFeed();
+ }
+
+ public function testRunMaxItem() {
+ global $request;
+ $expected_html = <<<EXPECTED
+<div class="rss"><h3><a href="http://www.phpwiki.org/fakeurl">This is a fake feed</a></h3>
+<dl>
+<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire</a></dt>
+<dd><div xmlns="http://www.w3.org/1999/xhtml">Millenium Spire, Dublin
+ <div class="geo">Geo coordinates:
+ <abbr class="latitude" title="53.349441">53.349441</abbr>
+ <abbr class="longitude" title="-6.260282">-6.260282</abbr>
+ </div>
+ </div></dd>
+</dl>
+</div>
+EXPECTED;
+ $html = $this->atom_feed_plugin->run(null, 'url=file://' . dirname(__FILE__) . '/atom-example.xml maxitem=1', $request, '.');
+ $this->assertEquals($expected_html, trim(html_entity_decode($html->asXML())));
+ }
+
+ public function testRunTitleOnly() {
+ global $request;
+ $expected_html = <<<EXPECTED
+<div class="rss"><h3><a href="http://www.phpwiki.org/fakeurl">This is a fake feed</a></h3>
+<dl>
+<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire</a></dt>
+<dd></dd>
+<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire 2</a></dt>
+<dd></dd>
+<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire 3</a></dt>
+<dd></dd>
+<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire 4</a></dt>
+<dd></dd>
+<dt><a href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8">Foobar Éire 5</a></dt>
+<dd></dd>
+</dl>
+</div>
+EXPECTED;
+ $html = $this->atom_feed_plugin->run(null, 'url=file://' . dirname(__FILE__) . '/atom-example.xml titleonly=true', $request, '.');
+ $this->assertEquals($expected_html, trim(html_entity_decode($html->asXML())));
+ }
+}
+?>
\ No newline at end of file
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/IncludePageTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/IncludePageTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/IncludePageTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: IncludePageTest.php 7181 2009-10-05 14:25:48Z vargenau $
require_once 'lib/WikiPlugin.php';
require_once 'lib/plugin/IncludePage.php';
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/ListPagesTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/ListPagesTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/ListPagesTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: ListPagesTest.php 7181 2009-10-05 14:25:48Z vargenau $
require_once 'lib/WikiPlugin.php';
require_once 'lib/plugin/ListPages.php';
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/OrphanedPagesTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/OrphanedPagesTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/OrphanedPagesTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: OrphanedPagesTest.php 7181 2009-10-05 14:25:48Z vargenau $
require_once 'lib/WikiPlugin.php';
require_once 'lib/plugin/OrphanedPages.php';
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/WantedPagesTest.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/WantedPagesTest.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/WantedPagesTest.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: WantedPagesTest.php 7181 2009-10-05 14:25:48Z vargenau $
require_once 'lib/WikiPlugin.php';
require_once 'lib/plugin/WantedPages.php';
Added: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/atom-example.xml
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/atom-example.xml (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/lib/plugin/atom-example.xml 2011-02-28 23:18:25 UTC (rev 15607)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom"
+ xmlns:georss="http://www.georss.org/georss" >
+ <link href="http://www.phpwiki.org/fakeurl" rel="self" type="application/atom+xml" />
+ <title>This is a fake feed</title>
+ <updated>2010-05-15T01:00:00Z</updated>
+ <id>http://www.phpwiki.org/fakeurl</id>
+ <subtitle>Cool feed</subtitle>
+ <author>
+ <name>Sébastien Le Callonnec</name>
+ <email>slc_ie at yahoo.ie</email>
+ </author>
+
+ <entry>
+ <title>Foobar Éire</title>
+ <link href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8"/>
+ <content type="xhtml">
+ <div xmlns="http://www.w3.org/1999/xhtml">Millenium Spire, Dublin
+ <div class="geo">Geo coordinates:
+ <abbr class="latitude" title="53.349441">53.349441</abbr>
+ <abbr class="longitude" title="-6.260282">-6.260282</abbr>
+ </div>
+ </div>
+ </content>
+ <updated>2010-05-15T01:00:00Z</updated>
+ <published>2010-05-15T01:00:00Z</published>
+ <georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
+ <id>tag:www.phpwiki.org,2010-05-15:/fakeurl/20100515223621</id>
+ </entry>
+ <entry>
+ <title>Foobar Éire 2</title>
+ <link href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8"/>
+ <content type="xhtml">
+ <div xmlns="http://www.w3.org/1999/xhtml">Again Millenium Spire, Dublin
+ <div class="geo">Geo coordinates:
+ <abbr class="latitude" title="53.349441">53.349441</abbr>
+ <abbr class="longitude" title="-6.260282">-6.260282</abbr>
+ </div>
+ </div>
+ </content>
+ <updated>2010-05-15T01:00:00Z</updated>
+ <published>2010-05-15T01:00:00Z</published>
+ <georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
+ <id>tag:www.phpwiki.org,2010-05-15:/fakeurl/20100515223622</id>
+ </entry>
+ <entry>
+ <title>Foobar Éire 3</title>
+ <link href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8"/>
+ <content type="xhtml">
+ <div xmlns="http://www.w3.org/1999/xhtml">Still Millenium Spire, Dublin
+ <div class="geo">Geo coordinates:
+ <abbr class="latitude" title="53.349441">53.349441</abbr>
+ <abbr class="longitude" title="-6.260282">-6.260282</abbr>
+ </div>
+ </div>
+ </content>
+ <updated>2010-05-15T01:00:00Z</updated>
+ <published>2010-05-15T01:00:00Z</published>
+ <georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
+ <id>tag:www.phpwiki.org,2010-05-15:/fakeurl/20100515223623</id>
+ </entry>
+ <entry>
+ <title>Foobar Éire 4</title>
+ <link href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8"/>
+ <content type="xhtml">
+ <div xmlns="http://www.w3.org/1999/xhtml">Yet Again Millenium Spire, Dublin
+ <div class="geo">Geo coordinates:
+ <abbr class="latitude" title="53.349441">53.349441</abbr>
+ <abbr class="longitude" title="-6.260282">-6.260282</abbr>
+ </div>
+ </div>
+ </content>
+ <updated>2010-05-15T01:00:00Z</updated>
+ <published>2010-05-15T01:00:00Z</published>
+ <georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
+ <id>tag:www.phpwiki.org,2010-05-15:/fakeurl/20100515223624</id>
+ </entry>
+ <entry>
+ <title>Foobar Éire 5</title>
+ <link href="http://maps.google.com/maps?f=q&sll=53.125728,-6.068907&ie=UTF8"/>
+ <content type="xhtml">
+ <div xmlns="http://www.w3.org/1999/xhtml">Yes, yes Millenium Spire, Dublin
+ <div class="geo">Geo coordinates:
+ <abbr class="latitude" title="53.349441">53.349441</abbr>
+ <abbr class="longitude" title="-6.260282">-6.260282</abbr>
+ </div>
+ </div>
+ </content>
+ <updated>2010-05-15T01:00:00Z</updated>
+ <published>2010-05-15T01:00:00Z</published>
+ <georss:box>53.349441 -6.26234 53.35078 -6.260282</georss:box>
+ <id>tag:www.phpwiki.org,2010-05-15:/fakeurl/20100515223625</id>
+ </entry>
+</feed>
\ No newline at end of file
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/pcre-crash.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/pcre-crash.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/pcre-crash.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: pcre-crash.php 7181 2009-10-05 14:25:48Z vargenau $
$blockpats=array();
$blockpats[] = '[ \t]+\S(?:.*\s*\n[ \t]+\S)*';
@@ -42,4 +42,4 @@
//preg_match($block_re, $subj, $m);
echo "ok\n";
-?>
\ No newline at end of file
+?>
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/runme_all
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/runme_all 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/runme_all 2011-02-28 23:18:25 UTC (rev 15607)
@@ -8,7 +8,7 @@
for db in file dba SQL ADODB cvs \
PearDB_mysql PearDB_pgsql PearDB_sqlite \
- ADODB_mysql ADODB_postgres7 ADODB_sqlite
+ ADODB_mysql ADODB_postgres7 ADODB_sqlite \
PDO_mysql PDO_pgsql PDO_sqlite
do
php -Cq -d register_argc_argv=1 test.php debug=1 level=10 db=$db | \
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/test.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/test.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit/test.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,28 +1,29 @@
<?php // #!/usr/local/bin/php -Cq
/* Copyright (C) 2004 Dan Frankowski <dfrankow at cs.umn.edu>
* Copyright (C) 2004,2005,2006 Reini Urban <rurban at x-ray.at>
+ * $Id: test.php 7638 2010-08-11 11:58:40Z vargenau $
*
* This file is part of PhpWiki.
- *
+ *
* PhpWiki is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* PhpWiki is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with PhpWiki; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
- * Unit tests for PhpWiki.
+ * Unit tests for PhpWiki.
*
- * You must have PEAR's PHPUnit package <http://pear.php.net/package/PHPUnit>.
+ * You must have PEAR's PHPUnit package <http://pear.php.net/package/PHPUnit>.
* These tests are unrelated to test/maketest.pl, which do not use PHPUnit.
* These tests run from the command-line as well as from the browser.
* Use the argv (from cli) or tests (from browser) params to run only certain tests.
@@ -61,7 +62,7 @@
$cur_dir = str_replace("\\","/", $cur_dir);
$rootdir = $cur_dir . '/../../';
$ini_sep = substr(PHP_OS,0,3) == 'WIN' ? ';' : ':';
-$include_path = ini_get('include_path') . $ini_sep
+$include_path = ini_get('include_path') . $ini_sep
. $rootdir . $ini_sep . $rootdir . "lib/pear";
ini_set('include_path', $include_path);
define('DEFAULT_LANGUAGE','en'); // don't use browser detection
@@ -88,16 +89,16 @@
'ADODB', // same backend as defined in the config.ini DSN
// specific backends (need to be setup as db=test_phpwiki)
'PearDB_pgsql', 'PearDB_sqlite', 'PearDB_mysql',
- //'PearDB_oci8','PearDB_mssql',
- 'ADODB_postgres7', 'ADODB_sqlite', 'ADODB_mysql',
- //'ADODB_oci8', 'ADODB_mssql',
+ //'PearDB_oci8','PearDB_mssql',
+ 'ADODB_postgres7', 'ADODB_sqlite', 'ADODB_mysql',
+ //'ADODB_oci8', 'ADODB_mssql',
// 'cvs'
);
if ((int)substr(phpversion(), 1) >= 5)
array_push($database_backends, 'PDO_pqsql', 'PDO_sqlite', 'PDO_mysql');
//'PDO_oci', 'PDO_odbc'
-//TODO: convert cvs test
+//TODO: convert cvs test
// For "cvs" see the seperate tests/unit_test_backend_cvs.php (cvs is experimental)
//TODO: read some database values from config.ini, just use the "test_" prefix
// "flatfile" testing occurs in "tests/unit/.testbox/flatfile"
@@ -123,7 +124,7 @@
$mem = getMemoryUsage();
if (!$initmem) $initmem = $mem;
// old libc on sf.net server doesn't understand "%+4d"
- echo sprintf("%8d\t[%s%4d]\t[+%4d]\n", $mem, $mem > $oldmem ? "+" : ($mem == $oldmem ? " " : ""),
+ echo sprintf("%8d\t[%s%4d]\t[+%4d]\n", $mem, $mem > $oldmem ? "+" : ($mem == $oldmem ? " " : ""),
$mem - $oldmem, $mem - $initmem);
// TODO: print time
flush();
@@ -162,7 +163,7 @@
else
error_reporting(E_ALL); // php4
-// This is too strict, fails on every notice and warning.
+// This is too strict, fails on every notice and warning.
/*
function myErrorHandler$errno, $errstr, $errfile, $errline) {
echo "$errfile: $errline: error# $errno: $errstr\n";
@@ -198,7 +199,7 @@
}
function purge_testbox() {
- global $DBParams;
+ global $DBParams;
if (isset($GLOBALS['request'])) {
$dbi = $GLOBALS['request']->getDbh();
}
@@ -243,8 +244,8 @@
global $debug_level, $user_level, $start_debug;
$form = HTML();
- $option = HTML::div(array('class' => 'option'),
- HTML::span(array('title' => 'doubleclick to (un)select all', 'style'=>'font-weight: bold; padding: 1px; border: 2px outset;','onDblClick'=>'flipAll(\'test[\')'),
+ $option = HTML::div(array('class' => 'option'),
+ HTML::span(array('title' => 'doubleclick to (un)select all', 'style'=>'font-weight: bold; padding: 1px; border: 2px outset;','onDblClick'=>'flipAll(\'test[\')'),
' test: '),
HTML::br());
$i = 0;
@@ -256,8 +257,8 @@
}
$form->pushContent(HTML::td($option));
- $option = HTML::div(array('class' => 'option'),
- HTML::span(array('title' => 'doubleclick to (un)select all', 'style'=>'font-weight: bold; padding: 1px; border: 2px outset;', 'onDblClick'=>'flipAll(\'db[\')'),
+ $option = HTML::div(array('class' => 'option'),
+ HTML::span(array('title' => 'doubleclick to (un)select all', 'style'=>'font-weight: bold; padding: 1px; border: 2px outset;', 'onDblClick'=>'flipAll(\'db[\')'),
' db: '),
HTML::br());
foreach ($GLOBALS['database_backends'] as $s) {
@@ -274,7 +275,7 @@
formObj = document.forms[0];
for (var i=0; i < formObj.length; i++) {
fldObj = formObj.elements[i];
- if ((fldObj.type == 'checkbox') && (fldObj.name.substring(0,formName.length) == formName)) {
+ if ((fldObj.type == 'checkbox') && (fldObj.name.substring(0,formName.length) == formName)) {
if (isFirstSet == -1)
isFirstSet = (fldObj.checked) ? true : false;
fldObj.checked = (isFirstSet) ? false : true;
@@ -285,7 +286,7 @@
val=0;
for (var i=0; i < formObj.length; i++) {
fldObj = formObj.elements[i];
- if ((fldObj.type == 'checkbox') && (fldObj.name.substring(0,7) == '_debug[')) {
+ if ((fldObj.type == 'checkbox') && (fldObj.name.substring(0,7) == '_debug[')) {
if (fldObj.checked) val = val + parseInt(fldObj.value);
}
}
@@ -304,7 +305,7 @@
}");
$option = HTML::div(array('class' => 'option'),
HTML::span(array('title' => 'doubleclick to (un)select all', 'style'=>'font-weight: bold; padding: 1px; border: 2px outset;',
- 'onDblClick'=>'flipAll(\'_debug[\')'),
+ 'onDblClick'=>'flipAll(\'_debug[\')'),
' debug: '),' ',
HTML::input(array('name'=>'debug','id'=>'debug',
'value'=>$debug_level,'size'=>5)),
@@ -327,7 +328,7 @@
}
$form->pushContent(HTML::td($option));
- $option = HTML::div(array('class' => 'option'),
+ $option = HTML::div(array('class' => 'option'),
HTML::span(array('style'=>'font-weight: bold;'), "level: "),
HTML::input(array('name'=>'level','id'=>'level',
'value'=>$user_level,'size'=>5)),
@@ -385,7 +386,7 @@
elseif (!ini_get("register_argc_argv"))
echo "Could not read cmd args (register_argc_argv=Off?)\n";
// purge the testbox
-
+
$debug_level = 1; //was 9, _DEBUG_VERBOSE | _DEBUG_TRACE
//if (defined('E_STRICT')) $debug_level = 5; // add PARSER flag on php5
$user_level = 1; // BOGO (conflicts with RateIt)
@@ -399,6 +400,7 @@
/* valid tests only with clean virgin setup */
'AllPagesTest','AllUsersTest','OrphanedPagesTest',
'WantedPagesTest','TextSearchTest','IncludePageTest',
+ 'AtomParserTest','AtomFeedTest',
/* final tests which require all valid pages and consumes > 32MB */
'DumpHtml');
// support db=file db=dba test=SetupWiki test=DumpHtml debug=num -dconstant=value
@@ -415,7 +417,7 @@
}
} elseif (!empty($argv) and preg_match("/test\.php$/", $argv[0])) {
array_shift($argv);
-}
+}
if (!empty($argv)) {
$runtests = array();
$define = array();
@@ -468,7 +470,7 @@
if (!defined('DEBUG'))
define('DEBUG', $debug_level);
// override defaults:
-if (!defined('RATING_STORAGE'))
+if (!defined('RATING_STORAGE'))
define('RATING_STORAGE', 'WIKIPAGE');
if (!defined('GROUP_METHOD'))
define('GROUP_METHOD', 'NONE');
@@ -493,7 +495,7 @@
if ($debug_level & 1) {
//echo "\n";
- echo "PHPWIKI_VERSION=",PHPWIKI_VERSION,
+ echo "PHPWIKI_VERSION=",PHPWIKI_VERSION,
strstr(PHPWIKI_VERSION,"pre") ? strftime(" / %Y%m%d") : "","\n";
if ($debug_level & 9) {
// which constants affect memory?
@@ -567,7 +569,7 @@
// save and restore all args for each test.
class phpwiki_TestCase extends PHPUnit_TestCase {
- function setUp() {
+ function setUp() {
global $request, $WikiTheme;
include_once("themes/" . THEME . "/themeinfo.php");
$this->_savedargs = $request->_args;
@@ -606,7 +608,7 @@
$DBParams['dsn'] = preg_replace("/^([^:]+):/", substr($dbtype, 4).":", $DBParams['dsn']);
echo "dsn: ",$DBParams['dsn'],"\n";
}
- // sqlite fix:
+ // sqlite fix:
if (preg_match('/sqlite$/', $dbtype)) {
$DBParams['dsn'] = preg_replace("/127\.0\.0\.1/", '', $DBParams['dsn']);
echo "dsn: ",$DBParams['dsn'],"\n";
@@ -633,12 +635,12 @@
$suite = new PHPUnit_TestSuite("phpwiki");
if (file_exists(dirname(__FILE__).'/lib/'.$test.'.php'))
require_once dirname(__FILE__).'/lib/'.$test.'.php';
- else
+ else
require_once dirname(__FILE__).'/lib/plugin/'.$test.'.php';
$suite->addTest( new PHPUnit_TestSuite($test) );
- @set_time_limit(240);
- $result = PHPUnit::run($suite);
+ @set_time_limit(240);
+ $result = PHPUnit::run($suite);
echo "ran " . $result->runCount() . " tests, " . $result->failureCount() . " failures.\n";
ob_end_flush();
if ($result->failureCount() > 0) {
@@ -659,26 +661,11 @@
if (isset($HTTP_SERVER_VARS['REQUEST_METHOD']))
echo "</pre>\n";
-// $Log: not supported by cvs2svn $
-// Revision 1.46 2007/01/21 12:26:38 rurban
-// Improve UI (label, button)
-//
-// Revision 1.45 2007/01/04 16:48:15 rurban
-// Do sqlite
-//
-// Revision 1.44 2006/12/23 11:44:56 rurban
-// deal with strict references and the order of deletion
-//
-// Revision 1.43 2006/06/05 09:35:02 rurban
-// add experimental backend flatfile, minor fixes
-//
-
-// (c-file-style: "gnu")
// Local Variables:
// mode: php
// tab-width: 8
// c-basic-offset: 4
// c-hanging-comment-ender-p: nil
// indent-tabs-mode: nil
-// End:
+// End:
?>
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit_test_backend_cvs.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit_test_backend_cvs.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/unit_test_backend_cvs.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -5,13 +5,12 @@
* is designed to be run directly using the php4 command.
*
* Author: Gerrit Riessen, gerrit.riessen at open-source-consultants.de
+ * $Id: unit_test_backend_cvs.php 7417 2010-05-19 12:57:42Z vargenau $
*/
// assume that the we've cd'ed to the tests directory
ini_set('include_path', '..' );
-function rcs_id() {}
-
if ( $USER == "root" ) {
// root user can't check in to a CVS repository
print( "can not be run as root\n" );
@@ -116,4 +115,4 @@
print "It appears something went wrong, nothing being removed\n";
}
-?>
\ No newline at end of file
+?>
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/interop-client.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/interop-client.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/interop-client.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -5,6 +5,7 @@
Author: Dan Libby (dan at libby.com)
Epinions.com may be contacted at feedback at epinions-inc.com
+ $Id: interop-client.php 7181 2009-10-05 14:25:48Z vargenau $
*/
/*
@@ -214,7 +215,7 @@
"varInt" => 186000,
"varString" => "18 > 2 && 2 < 18 && 42 == the answer to life, the universe, and everything" ));
run_test($server, $debug, $output, "interopEchoTests.echoStringArray",
- array($decl_1, $decl_2, $decl_3, $decl_4, "non-ascii chars above 127 (165-170): ¥, ¦, §, ¨, ©, ª"));
+ array($decl_1, $decl_2, $decl_3, $decl_4, "non-ascii chars above 127 (165-170): ¥, ¦, §, ¨, ©, ª"));
run_test($server, $debug, $output, "interopEchoTests.echoIntegerArray",
array(23, 234, 1, 0, -10, 999));
run_test($server, $debug, $output, "interopEchoTests.echoFloatArray",
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/interop-server.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/interop-server.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/interop-server.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: interop-server.php 7181 2009-10-05 14:25:48Z vargenau $
include("xmlrpc_utils.php");
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/validate-form.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/validate-form.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/validate-form.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,6 +1,6 @@
<html>
-<?php
+<?php // $Id: validate-form.php 7181 2009-10-05 14:25:48Z vargenau $
/*
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/validate.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/validate.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/validate.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: validate.php 7181 2009-10-05 14:25:48Z vargenau $
/*
This file is part of, or distributed with, libXMLRPC - a C library for
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-client.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-client.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-client.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -7,6 +7,7 @@
* http://www.ecyrd.com/JSPWiki/Wiki.jsp?page=WikiRPCInterface
* Author: Reini Urban
+ * $Id: xmlrpc-client.php 7181 2009-10-05 14:25:48Z vargenau $
*/
/*
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-introspect.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-introspect.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-introspect.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: xmlrpc-introspect.php 7181 2009-10-05 14:25:48Z vargenau $
/*********************************
* system.describeMethods Support *
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-servers.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-servers.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc-servers.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: xmlrpc-servers.php 7181 2009-10-05 14:25:48Z vargenau $
/**
* List of various interop and wiki servers to test against.
* interop for the basic library functionality, and then the wiki API.
@@ -274,4 +274,4 @@
);
}
-?>
\ No newline at end of file
+?>
Modified: trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc_utils.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc_utils.php 2011-02-28 23:18:18 UTC (rev 15606)
+++ trunk/gforge_base/evolvisforge-5.1/src/plugins/wiki/www/tests/xmlrpc/xmlrpc_utils.php 2011-02-28 23:18:25 UTC (rev 15607)
@@ -1,4 +1,4 @@
-<?php
+<?php // $Id: xmlrpc_utils.php 7181 2009-10-05 14:25:48Z vargenau $
// This file has moved. keeping below for legacy compat reasons.
More information about the evolvis-commits
mailing list