By the way, I did have to add little require_once()-s to a bunch of
files to make these tests work. Basically, the classes have to be a
little more independent, which is good. Here are example patches, but I
may have missed some.
diff -b -u -r1.14 -r1.15
--- PageList.php 27 May 2004 19:40:11 -0000 1.14
+++ PageList.php 28 May 2004 16:07:11 -0000 1.15
@@ -57,6 +57,11 @@
* new method:
* list not as <ul> or table, but as simple comma-seperated list
*/
+
+require_once("lib/WikiUserNew.php");
+require_once("lib/PagePerm.php");
+require_once("lib/Theme.php");
+
class _PageList_Column_base {
var $_tdattr = array();
diff -b -u -r1.3 -r1.4
--- AllUsers.php 28 May 2004 16:11:39 -0000 1.3
+++ AllUsers.php 28 May 2004 19:12:12 -0000 1.4
@@ -21,6 +21,7 @@
*/
require_once('lib/PageList.php');
+require_once('lib/WikiGroup.php');
etc..
I also attach ListPages if you are interested. It's just sugar (could be
done in other ways), but we felt it was useful somehow.
Dan
Dan Frankowski wrote:
> Whoops, I meant to sent this to phpwiki-talk.
>
> Dan
>
> -------- Original Message --------
> Subject: More unit tests (WAS: Re: Sorting on any PageList column
> (WAS: Re: [Phpwiki-talk] Re: Development on phpwiki))
> Date: Fri, 28 May 2004 14:24:49 -0500
> From: Dan Frankowski <dfr...@cs...>
> To: Reini Urban <ru...@x-...>
> References: <409...@cs...>
> <40A...@x-...> <40A...@cs...>
> <40A...@x-...> <40B...@cs...>
> <40B...@x-...>
>
>
>
> Reini Urban wrote:
>
>> Very good! Finally I don't have to do all the work alone.
>> I'll add this tomorrow.
>
>
>
> Cool! Glad you like it.
>
> By the way, I attach more unit tests in a tarball. These are simple,
> simple things, but those can still help. For example, we changed a
> function name and accidentally broke AllPages, AllUsers,
> OrphanedPages. (Then we changed it back, of course.) Thus, I wrote
> these simple tests that would have caught that.
>
> Unfortunately, no real good unit tests for PageList yet, but I am
> going to write at least a couple to test sorting.
>
> Dan
>
>
>
|