From 4009bc98e96c38d22b3c199f3bfefe4c30783d00 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sun, 2 Jul 2006 04:51:24 +0000 Subject: Add Ticket tests --- .../validators/protected/pages/Home.php | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 tests/FunctionalTests/validators/protected/pages/Home.php (limited to 'tests/FunctionalTests/validators/protected/pages/Home.php') diff --git a/tests/FunctionalTests/validators/protected/pages/Home.php b/tests/FunctionalTests/validators/protected/pages/Home.php new file mode 100755 index 00000000..37804419 --- /dev/null +++ b/tests/FunctionalTests/validators/protected/pages/Home.php @@ -0,0 +1,34 @@ +getPageList(dirname(__FILE__),''); + $this->List->DataSource=$list; + $this->List->dataBind(); + } + + protected function getPageList($directory,$basePath) + { + $list=array(); + $folder=@opendir($directory); + while($entry=@readdir($folder)) + { + if($entry[0]==='.') + continue; + else if(is_file($directory.'/'.$entry)) + { + if(($page=basename($entry,'.page'))!==$entry && strpos($page,'.')===false) + $list['?page='.$basePath.$page]=$basePath.$page; + } + else + $list=array_merge($list,$this->getPageList($directory.'/'.$entry,$basePath.$entry.'.')); + } + closedir($folder); + return $list; + } +} + +?> \ No newline at end of file -- cgit v1.2.3