Example #1
0
	/**
	 * Tests Validate::alpha_numberic()
	 *
	 * Checks whether a string consists of alphabetical characters and numbers only.
	 *
	 * @test
	 * @group kohana.validation.helpers
	 * @dataProvider provide_alpha_numeric
	 * @param string  $input     The string to test
	 * @param boolean $expected  Is $input valid
	 */
	public function test_alpha_numeric($input, $expected, $utf8 = FALSE)
	{
		$this->assertSame(
			$expected,
			Validate::alpha_numeric($input, $utf8)
		);
	}
Example #2
0
 /**
  * Tests Validate::alpha_numberic()
  *
  * Checks whether a string consists of alphabetical characters and numbers only.
  *
  * @test
  * @group kohana.validation.helpers
  * @dataProvider provideAlphaNumeric
  * @param string  $input     The string to test
  * @param boolean $expected  Is $input valid
  */
 public function testAlphaNumeric($input, $expected)
 {
     $this->assertSame($expected, Validate::alpha_numeric($input));
 }