summaryrefslogtreecommitdiff
path: root/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php
blob: 894c3899cdefc7f46e6e91ce0651b0ebed5187ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php


Prado::using('System.Web.UI.WebControls.TRequiredFieldValidator');

/**
 * @package System.Web.UI.WebControls
 */
class TRequiredFieldValidatorTest extends PHPUnit_Framework_TestCase {

  public function testGetEmptyInitialValue() {
    $validator = new TRequiredFieldValidator();
    try {
    	$value = $validator->getInitialValue();
    } catch (TConfigurationException $e) {
    	//since prado 3.2.2 you need to set at least ControlToValidate
    	$value = '';
    }
    $this->assertEquals('', $value);
  }
}

?>