mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Removing validation tests that relied on removed define()'ed constants.
This commit is contained in:
parent
84b5458a36
commit
c95221919a
1 changed files with 0 additions and 27 deletions
|
@ -1770,33 +1770,6 @@ class ValidationTest extends CakeTestCase {
|
||||||
$this->assertFalse(Validation::inList('three', array('one', 'two')));
|
$this->assertFalse(Validation::inList('three', array('one', 'two')));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* testValidNumber method
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function testValidNumber() {
|
|
||||||
$this->assertTrue(Validation::custom('12345', VALID_NUMBER));
|
|
||||||
$this->assertTrue(Validation::custom('-12345', VALID_NUMBER));
|
|
||||||
$this->assertTrue(Validation::custom('+12345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('--12345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('++12345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('a12345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('12345z', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('-a12345z', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('-', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('123-12345', VALID_NUMBER));
|
|
||||||
$this->assertTrue(Validation::custom('1.2345', VALID_NUMBER));
|
|
||||||
$this->assertTrue(Validation::custom('-1.2345', VALID_NUMBER));
|
|
||||||
$this->assertTrue(Validation::custom('+1.2345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('1..2345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('-1..2345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('+1..2345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('.2345', VALID_NUMBER));
|
|
||||||
$this->assertFalse(Validation::custom('12345.', VALID_NUMBER));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testRange method
|
* testRange method
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue