Skip to content
Permalink
Browse files

Removing validation tests that relied on removed define()'ed constants.

  • Loading branch information...
jperras committed Oct 7, 2009
1 parent 84b5458 commit c95221919ab00b0b5d308c6584493c8d4864360a
Showing with 0 additions and 27 deletions.
  1. +0 −27 cake/tests/cases/libs/validation.test.php
@@ -1770,33 +1770,6 @@ function testInList() {
$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
*

0 comments on commit c952219

Please sign in to comment.
You can’t perform that action at this time.