From cb7b7f1929dce12936eca957caa432e74c6dc7de Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 12 Mar 2006 04:43:03 +0000 Subject: reorganized FT tests. --- .../features/protected/pages/FeatureList.php | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/FunctionalTests/features/protected/pages/FeatureList.php (limited to 'tests/FunctionalTests/features/protected/pages/FeatureList.php') diff --git a/tests/FunctionalTests/features/protected/pages/FeatureList.php b/tests/FunctionalTests/features/protected/pages/FeatureList.php new file mode 100644 index 00000000..7f82d34e --- /dev/null +++ b/tests/FunctionalTests/features/protected/pages/FeatureList.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