diff options
author | xue <> | 2006-03-12 04:43:03 +0000 |
---|---|---|
committer | xue <> | 2006-03-12 04:43:03 +0000 |
commit | cb7b7f1929dce12936eca957caa432e74c6dc7de (patch) | |
tree | 5de1b58f968241299e65e8ac852f88d755f8f25d /tests/FunctionalTests/features/protected/pages/FeatureList.php | |
parent | dcaeab55c94f6f51ab92b7d1a70503a544df73cd (diff) |
reorganized FT tests.
Diffstat (limited to 'tests/FunctionalTests/features/protected/pages/FeatureList.php')
-rw-r--r-- | tests/FunctionalTests/features/protected/pages/FeatureList.php | 34 |
1 files changed, 34 insertions, 0 deletions
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 @@ +<?php
+
+class FeatureList extends TPage
+{
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ $list=$this->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 |