Beispiel #1
0
 /**
  * @param string $token_to_validate : the token value to control
  * @param array $source : the source array where match the expected
  * token
  * @access public
  * @return void
  */
 public function __construct($tokenToValidate, $source = array())
 {
     $this->_tokenToControl = strval($tokenToValidate);
     $this->_source =& $source;
     parent::__construct();
     $this->validate();
 }
Beispiel #2
0
 /**
  * test the default validator
  * @acces public
  * @return void
  */
 public function testDefaultValidator()
 {
     $validator = new Validator_Base();
     $this->assertTrue($validator->isValid(), "Default validator must always return true");
 }