summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorwei <>2007-01-24 05:52:22 +0000
committerwei <>2007-01-24 05:52:22 +0000
commite306989c6d03aac37e2557465b4812ea21970065 (patch)
tree7e2524a33cedf49831eb3c5ae15cd1bed3c3ab2c /tests
parentdec4042d10caa5a54b753fab950f16218fa62d8d (diff)
Fixed #517, #519, #521
Diffstat (limited to 'tests')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket518.page10
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket521.page12
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket521.php16
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket521TestCase.php20
-rw-r--r--tests/simple_unit/ActiveRecord/ActiveRecordDynamicCallTestCase.php15
5 files changed, 71 insertions, 2 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket518.page b/tests/FunctionalTests/tickets/protected/pages/Ticket518.page
new file mode 100644
index 00000000..657dc4cf
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket518.page
@@ -0,0 +1,10 @@
+<com:TContent ID="Content">
+<h2 class="defect">Not possible to add custom buttons to TinyMCE</h2>
+
+<com:THtmlArea>
+ <prop:Options>
+ theme_advanced_buttons3: 'justifyleft,justifycenter'
+ </prop:Options>
+</com:THtmlArea>
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket521.page b/tests/FunctionalTests/tickets/protected/pages/Ticket521.page
new file mode 100644
index 00000000..e1f65663
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket521.page
@@ -0,0 +1,12 @@
+<com:TContent ID="Content">
+
+<!--
+ <com:System.Web.UI.ActiveControls.TActiveButton ID="addInvestType" Text="Add"
+ OnCallback="doSave" />
+-->
+<com:System.Web.UI.ActiveControls.TActiveButton id="button1" OnClick="doOnClick" OnCallback="doSave" Text="Save" />
+<com:System.Web.UI.ActiveControls.TActiveLabel ID="label1" Text="Label 1" />
+
+
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket521.php b/tests/FunctionalTests/tickets/protected/pages/Ticket521.php
new file mode 100644
index 00000000..d28a777a
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket521.php
@@ -0,0 +1,16 @@
+<?php
+
+class Ticket521 extends TPage
+{
+
+ public function doOnClick($s, $p){
+ $this->label1->Text = "Button 1 was clicked ";
+ }
+ public function doSave($s, $p){
+ $this->label1->Text .= " on callback ";
+
+ }
+
+
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php
new file mode 100644
index 00000000..ea9feae8
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket521TestCase.php
@@ -0,0 +1,20 @@
+<?php
+
+class Ticket521TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base = 'ctl0_Content_';
+ $this->open("tickets/index.php?page=Ticket521");
+ $this->assertTitle("Verifying Ticket 521");
+ $this->assertText("{$base}label1", "Label 1");
+
+ $this->click("{$base}button1");
+ $this->pause(1200);
+
+ $this->assertText("{$base}label1", "Button 1 was clicked on callback");
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/tests/simple_unit/ActiveRecord/ActiveRecordDynamicCallTestCase.php b/tests/simple_unit/ActiveRecord/ActiveRecordDynamicCallTestCase.php
index 8f8868e9..75bbb2a4 100644
--- a/tests/simple_unit/ActiveRecord/ActiveRecordDynamicCallTestCase.php
+++ b/tests/simple_unit/ActiveRecord/ActiveRecordDynamicCallTestCase.php
@@ -1,5 +1,4 @@
-<?php
-
+<?php
Prado::using('System.Data.ActiveRecord.TActiveRecord');
require_once(dirname(__FILE__).'/records/DepartmentRecord.php');
require_once(dirname(__FILE__).'/records/DepSections.php');
@@ -47,6 +46,18 @@ class ActiveRecordDynamicCallTestCase extends UnitTestCase
$this->assertNotNull($rs);
}
+ function test_dynamic_delete_by()
+ {
+ $finder = DepartmentRecord::finder();
+ //$finder->RecordManager->OnDelete[] = array($this, 'assertDeleteSql');
+ $this->assertEqual($finder->deleteByName('tasds'), 0);
+ }
+
+ function assertDeleteSql($sender, $param)
+ {
+ var_dump($param);
+ }
+
}
?> \ No newline at end of file