Beispiel #1
0
 /**
  * Tests the the 'alphaNumeric' rule validates correct values.
  */
 public function testAlphaNumeric()
 {
     $this->assertTrue(Validator::isAlphaNumeric('frferrf'));
     $this->assertTrue(Validator::isAlphaNumeric('12234'));
     $this->assertTrue(Validator::isAlphaNumeric('1w2e2r3t4y'));
     $this->assertTrue(Validator::isAlphaNumeric('0'));
     $this->assertTrue(Validator::isAlphaNumeric('abçďĕʑʘπй'));
     $this->assertTrue(Validator::isAlphaNumeric('ˇˆๆゞ'));
     $this->assertTrue(Validator::isAlphaNumeric('אกあアꀀ豈'));
     $this->assertTrue(Validator::isAlphaNumeric('Džᾈᾨ'));
     $this->assertTrue(Validator::isAlphaNumeric('ÆΔΩЖÇ'));
     $this->assertTrue(Validator::isAlphaNumeric('日本語でも'));
     $this->assertTrue(Validator::isAlphaNumeric('をありがとうございました'));
     $this->assertFalse(Validator::isAlphaNumeric('12 234'));
     $this->assertFalse(Validator::isAlphaNumeric('dfd 234'));
     $this->assertFalse(Validator::isAlphaNumeric('こんにちは!'));
     $this->assertFalse(Validator::isAlphaNumeric("\n"));
     $this->assertFalse(Validator::isAlphaNumeric("\t"));
     $this->assertFalse(Validator::isAlphaNumeric("\r"));
     $this->assertFalse(Validator::isAlphaNumeric(' '));
     $this->assertFalse(Validator::isAlphaNumeric(''));
 }