Esempio n. 1
0
 /**
  * testAlphaNumericPassedAsArray method
  *
  * @return void
  */
 public function testAlphaNumericPassedAsArray()
 {
     $this->assertTrue(Validation::alphaNumeric(['check' => 'frferrf']));
     $this->assertTrue(Validation::alphaNumeric(['check' => '12234']));
     $this->assertTrue(Validation::alphaNumeric(['check' => '1w2e2r3t4y']));
     $this->assertTrue(Validation::alphaNumeric(['check' => '0']));
     $this->assertFalse(Validation::alphaNumeric(['check' => '12 234']));
     $this->assertFalse(Validation::alphaNumeric(['check' => 'dfd 234']));
     $this->assertFalse(Validation::alphaNumeric(['check' => "\n"]));
     $this->assertFalse(Validation::alphaNumeric(['check' => "\t"]));
     $this->assertFalse(Validation::alphaNumeric(['check' => "\r"]));
     $this->assertFalse(Validation::alphaNumeric(['check' => ' ']));
     $this->assertFalse(Validation::alphaNumeric(['check' => '']));
 }
Esempio n. 2
0
 /**
  * testAlphaNumericPassedAsArray method
  *
  * @return void
  */
 public function testAlphaNumericPassedAsArray()
 {
     $this->assertTrue(Validation::alphaNumeric('frferrf'));
     $this->assertTrue(Validation::alphaNumeric('12234'));
     $this->assertTrue(Validation::alphaNumeric('1w2e2r3t4y'));
     $this->assertTrue(Validation::alphaNumeric('0'));
     $this->assertFalse(Validation::alphaNumeric('12 234'));
     $this->assertFalse(Validation::alphaNumeric('dfd 234'));
     $this->assertFalse(Validation::alphaNumeric("\n"));
     $this->assertFalse(Validation::alphaNumeric("\t"));
     $this->assertFalse(Validation::alphaNumeric("\r"));
     $this->assertFalse(Validation::alphaNumeric(' '));
     $this->assertFalse(Validation::alphaNumeric(''));
     $this->assertFalse(Validation::alphaNumeric(['foo']));
 }