コード例 #1
0
ファイル: ValidateTest.php プロジェクト: nesbert/nobjects
 public function testIsAlphaNumeric()
 {
     $this->assertTrue(Validate::isAlphaNumeric('Test'));
     $this->assertTrue(Validate::isAlphaNumeric('somereallongtexthere'));
     $this->assertTrue(Validate::isAlphaNumeric(123));
     $this->assertTrue(Validate::isAlphaNumeric(1));
     $this->assertTrue(Validate::isAlphaNumeric(0));
     $this->assertFalse(Validate::isAlphaNumeric('Test#1'));
     $this->assertFalse(Validate::isAlpha('2Test'));
     $this->assertFalse(Validate::isAlphaNumeric('Test Test'));
     $this->assertFalse(Validate::isAlphaNumeric('&'));
     $this->assertFalse(Validate::isAlphaNumeric(true));
     $this->assertFalse(Validate::isAlphaNumeric(false));
 }