summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page22
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php26
-rw-r--r--tests/FunctionalTests/validators/tests/DatePickerTestCase.php1
-rw-r--r--tests/simple_unit/I18N/CultureInfoTest.php13
4 files changed, 62 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page
new file mode 100644
index 00000000..df1db27a
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.page
@@ -0,0 +1,22 @@
+<com:TForm>
+<h1>Display Style Test</h1>
+
+<div>
+Some test
+<com:TActiveButton ID="button1" Display="None" Text="Button 1" />
+buttons
+<com:TActiveButton ID="button2" Display="Hidden" Text="Button 2" />
+here.
+</div>
+
+<com:TActiveButton Text="Display Button 1" OnClick="display_button1" />
+<com:TActiveButton Text="Hide Button 1" OnClick="hide_button1" />
+
+<com:TActiveButton Text="Show Button 2" OnClick="show_button2" />
+<com:TActiveButton Text="Hide Button 2" OnClick="hide_button2" />
+
+<com:TActiveLabel ID="status" />
+
+<com:TJavascriptLogger />
+
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php
new file mode 100644
index 00000000..a49a8bfa
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/DisplayStyleTest.php
@@ -0,0 +1,26 @@
+<?php
+
+class DisplayStyleTest extends TPage
+{
+ function display_button1()
+ {
+ $this->button1->Display="Dynamic";
+ }
+
+ function hide_button1()
+ {
+ $this->button1->Display="None";
+ }
+
+ function show_button2()
+ {
+ $this->button2->Display="Fixed";
+ }
+
+ function hide_button2()
+ {
+ $this->button2->Display="Hidden";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/validators/tests/DatePickerTestCase.php b/tests/FunctionalTests/validators/tests/DatePickerTestCase.php
index 95eb88e3..320802e4 100644
--- a/tests/FunctionalTests/validators/tests/DatePickerTestCase.php
+++ b/tests/FunctionalTests/validators/tests/DatePickerTestCase.php
@@ -29,6 +29,7 @@ class DatePickerTestCase extends SeleniumTestCase
$this->type("{$base}picker1", "13/4/2006");
$this->select("{$base}picker2_month", "label=9");
$this->select("{$base}picker2_day", "label=10");
+ $this->select("{$base}picker2_year", "label=2006");
$this->type("{$base}picker3", "14/4/2006");
$this->type("{$base}picker4", "7/4/2006");
$this->select("{$base}picker5_day", "label=6");
diff --git a/tests/simple_unit/I18N/CultureInfoTest.php b/tests/simple_unit/I18N/CultureInfoTest.php
new file mode 100644
index 00000000..840d8f17
--- /dev/null
+++ b/tests/simple_unit/I18N/CultureInfoTest.php
@@ -0,0 +1,13 @@
+<?php
+
+Prado::using('System.I18N.core.*');
+class CultureInfoTest extends UnitTestCase
+{
+ function test_missing_english_names_returns_culture_code()
+ {
+ $culture = new CultureInfo('iw');
+ $this->assertEqual($culture->getEnglishName(), 'iw');
+ }
+}
+
+?> \ No newline at end of file