summaryrefslogtreecommitdiff
path: root/tests/unit/Web/UI/WebControls/TRequiredFieldValidatorTest.php
blob: 86516d9087d1f260942d269b471e999849cdbfdd (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


use Prado\Exceptions\TConfigurationException;
use Prado\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);
  }
}