Exemple #1
0
 /**
  * @return void
  */
 public function testDifferentEncodingWithValidator()
 {
     iconv_set_encoding('internal_encoding', 'UTF-8');
     $validator = new StringLength(2, 2, 'UTF-8');
     $this->assertEquals(true, $validator->isValid('ab'));
     $this->assertEquals('UTF-8', $validator->getEncoding());
     $validator->setEncoding('ISO-8859-1');
     $this->assertEquals('ISO-8859-1', $validator->getEncoding());
 }