summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/validators')
-rwxr-xr-xtests/FunctionalTests/validators/protected/pages/Home.page3
-rwxr-xr-xtests/FunctionalTests/validators/protected/pages/Home.php34
2 files changed, 37 insertions, 0 deletions
diff --git a/tests/FunctionalTests/validators/protected/pages/Home.page b/tests/FunctionalTests/validators/protected/pages/Home.page
new file mode 100755
index 00000000..d4ac162c
--- /dev/null
+++ b/tests/FunctionalTests/validators/protected/pages/Home.page
@@ -0,0 +1,3 @@
+<com:TContent ID="Content">
+<com:TBulletedList ID="List" DisplayMode="HyperLink"/>
+</com:TContent> \ No newline at end of file
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 @@
+<?php
+
+class Home 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