summaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorCiro Mattia Gonano <ciromattia@gmail.com>2013-09-11 15:56:48 +0200
committerCiro Mattia Gonano <ciromattia@gmail.com>2013-09-11 15:57:07 +0200
commit3069eaf35e833ffe4a1c1c7829dd7e168ae27420 (patch)
treed0c2e4d934cc34ba7d4232f759923b5a257dcb21 /tests/unit
parentb833247ce597ec26159b46c8dfbea7f1e265950b (diff)
Merge up to r3319
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/Web/THttpRequestTest.php2
-rw-r--r--tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php8
2 files changed, 9 insertions, 1 deletions
diff --git a/tests/unit/Web/THttpRequestTest.php b/tests/unit/Web/THttpRequestTest.php
index e8b86ac8..a5f17f01 100644
--- a/tests/unit/Web/THttpRequestTest.php
+++ b/tests/unit/Web/THttpRequestTest.php
@@ -84,6 +84,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase {
$request->setUrlManager('invalidManagerId');
try {
$request->init(null);
+ $request->getUrlManagerModule();
self::fail ('httprequest_urlmanager_inexist exception not thrown');
} catch (TConfigurationException $e) {
@@ -98,6 +99,7 @@ class THttpRequestTest extends PHPUnit_Framework_TestCase {
$request->setUrlManager('badmanager');
try {
$request->init(null);
+ $request->getUrlManagerModule();
self::fail ('httprequest_urlmanager_invalid exception not thrown');
} catch (TConfigurationException $e) {
diff --git a/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php b/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php
index ae8ac1f5..e84b3cf3 100644
--- a/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php
+++ b/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php
@@ -10,7 +10,13 @@ class TRequiredFieldValidatorTest extends PHPUnit_Framework_TestCase {
public function testGetEmptyInitialValue() {
$validator = new TRequiredFieldValidator();
- $this->assertEquals('', $validator->getInitialValue());
+ try {
+ $value = $validator->getInitialValue();
+ } catch (TConfigurationException $e) {
+ //since prado 3.2.2 you need to set at least ControlToValidate
+ $value = '';
+ }
+ $this->assertEquals('', $value);
}
}