diff options
author | wei <> | 2006-07-02 04:51:24 +0000 |
---|---|---|
committer | wei <> | 2006-07-02 04:51:24 +0000 |
commit | 4009bc98e96c38d22b3c199f3bfefe4c30783d00 (patch) | |
tree | ec5125c72b4e49407bda6452631bb90692eb08f1 | |
parent | b2f51830b7ad319f5d978b411d9bfd87f03308eb (diff) |
Add Ticket tests
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | tests/FunctionalTests/index.php | 4 | ||||
-rwxr-xr-x | tests/FunctionalTests/tickets/protected/pages/Home.page | 3 | ||||
-rwxr-xr-x | tests/FunctionalTests/tickets/protected/pages/Home.php | 34 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket205.page | 4 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket207.page | 20 | ||||
-rwxr-xr-x | tests/FunctionalTests/validators/protected/pages/Home.page | 3 | ||||
-rwxr-xr-x | tests/FunctionalTests/validators/protected/pages/Home.php | 34 |
8 files changed, 101 insertions, 2 deletions
@@ -26,6 +26,7 @@ ENH: Added TDataGrid.EmptyTemplate property (Qiang) ENH: Added paging feature to all TDataBoundControl-derived controls (Qiang)
NEW: Added TPager (Qiang)
NEW: Added Dreamweaver taglib extension (Stanislav, Qiang)
+NEW: Prado Command line script to create a new project, see framework/prado-cli.php (Wei)
Version 3.0.1 June 4, 2006
==========================
diff --git a/tests/FunctionalTests/index.php b/tests/FunctionalTests/index.php index c22543c0..f8b76dee 100644 --- a/tests/FunctionalTests/index.php +++ b/tests/FunctionalTests/index.php @@ -8,8 +8,8 @@ Prado Functional Test Suites <h1>Prado Functional Test Suites</h1> <ul> <li><a href="quickstart.php">Tests of QuickStart Tutorial Demo</a></li> - <li><a href="validators.php">Tests of Validators</a></li> - <li><a href="tickets.php">Tests of Trac Tickets</a></li> + <li><a href="validators.php">Tests of Validators</a> (<a href="validators/index.php">test samples</a>)</li> + <li><a href="tickets.php">Tests of Trac Tickets</a> (<a href="tickets/index.php">test samples</a>)</li> <li><a href="features.php">Tests of New Features</a> (<a href="features/index.php">list of new features</a>)</li> </ul> </body> diff --git a/tests/FunctionalTests/tickets/protected/pages/Home.page b/tests/FunctionalTests/tickets/protected/pages/Home.page new file mode 100755 index 00000000..d4ac162c --- /dev/null +++ b/tests/FunctionalTests/tickets/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/tickets/protected/pages/Home.php b/tests/FunctionalTests/tickets/protected/pages/Home.php new file mode 100755 index 00000000..37804419 --- /dev/null +++ b/tests/FunctionalTests/tickets/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 diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket205.page b/tests/FunctionalTests/tickets/protected/pages/Ticket205.page new file mode 100644 index 00000000..1f271c14 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket205.page @@ -0,0 +1,4 @@ +<com:TContent ID="Content"> + <h3>TCustomValidator not enabling ControlCssClass or prop:ClientSide.OnError after postback.</h3> + +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket207.page b/tests/FunctionalTests/tickets/protected/pages/Ticket207.page new file mode 100644 index 00000000..8826c208 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket207.page @@ -0,0 +1,20 @@ +<com:TContent ID="Content"> + <h2>Validators ClientSide.OnError triggered twice</h2> + <com:TTextBox ID="T" /><br /> + <com:TRequiredFieldValidator ControlToValidate="T" Text="Error" + ClientSide.OnError="Logger.info('error on T fired')" /> + <br /> + <com:TTextBox ID="B" /><br /> + <com:TRequiredFieldValidator ControlToValidate="B" Text="Error" /> + <br /> + <com:TButton Text="submit" /> + <h3>Conditions</h3> +<pre> + (TextBox? B is just there to prevent server submission) + To verify try exactly this: + + 1. Enter nothing and click on submit : 1 error event will be triggered + 2. Enter something into TextBox? T and click on submit : no error event (ok) + 3. Delete your text from TextBox? T again and click on submit : error event will be triggered twice +</pre> +</com:TContent>
\ No newline at end of file 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 |