diff options
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/Web/THttpRequestTest.php | 2 | ||||
-rw-r--r-- | tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php | 8 |
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); } } |