summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/issues
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/issues')
-rwxr-xr-xtests/FunctionalTests/issues/protected/pages/Issue524.page7
-rwxr-xr-xtests/FunctionalTests/issues/protected/pages/Issue524.php20
-rwxr-xr-xtests/FunctionalTests/issues/tests/Issue524TestCase.php20
3 files changed, 47 insertions, 0 deletions
diff --git a/tests/FunctionalTests/issues/protected/pages/Issue524.page b/tests/FunctionalTests/issues/protected/pages/Issue524.page
new file mode 100755
index 00000000..08ac1814
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/pages/Issue524.page
@@ -0,0 +1,7 @@
+<com:TContent ID="Content">
+ <h1>Issue 524 Test</h1>
+ <com:TTextBox ID="textbox1" />
+ <com:TActiveButton ID="buttonOk" Text="Ok button" />
+ <com:TActiveCustomValidator ID="Validator" ControlToValidate="textbox1" OnServerValidate="validateText" Text="Input is invalid." />
+</com:TContent>
+
diff --git a/tests/FunctionalTests/issues/protected/pages/Issue524.php b/tests/FunctionalTests/issues/protected/pages/Issue524.php
new file mode 100755
index 00000000..851ff45a
--- /dev/null
+++ b/tests/FunctionalTests/issues/protected/pages/Issue524.php
@@ -0,0 +1,20 @@
+<?php
+
+Prado::using('System.Web.UI.ActiveControls.*');
+
+class Issue524 extends TPage
+{
+
+ public function __construct() {
+ Prado::getApplication()->getGlobalization()->setCharset('ISO-8859-1');
+ parent::__construct();
+ }
+
+ public function validateText($sender, $param)
+ {
+ $param->IsValid = false;
+ $iso8859text=iconv('utf-8', 'iso-8859-1', 'fünf');
+ $this->Validator->ErrorMessage = $iso8859text;
+ }
+
+}
diff --git a/tests/FunctionalTests/issues/tests/Issue524TestCase.php b/tests/FunctionalTests/issues/tests/Issue524TestCase.php
new file mode 100755
index 00000000..2582dda0
--- /dev/null
+++ b/tests/FunctionalTests/issues/tests/Issue524TestCase.php
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Testcase for Issue 524
+ * Encoding issues caused an error when serializing the
+ * response
+ **/
+class Issue524TestCase extends PradoGenericSelenium2Test
+{
+ function test()
+ {
+ $this->url('issues/index.php?page=Issue524');
+ $this->assertContains('Issue 524 Test', $this->source());
+ $base='ctl0_Content_';
+
+ $this->byID("{$base}buttonOk")->click();
+
+ $this->assertText("{$base}Validator", "fünf");
+ }
+}