testBetween() public method

Returns value if it is greater than or equal to $min and less than or equal to $max, FALSE otherwise. If $inc is set to FALSE, then the value must be strictly greater than $min and strictly less than $max.
public testBetween ( mixed $key, mixed $min, mixed $max, boolean $inc = true ) : mixed
$key mixed
$min mixed
$max mixed
$inc boolean
return mixed
コード例 #1
0
ファイル: CageTest.php プロジェクト: funkatron/inspekt
 /**
  */
 public function testTestMethodsReturnFalseIfKeyDoesNotExist()
 {
     $this->assertFalse($this->cage->keyExists('/x/woot/0'));
     $this->assertFalse($this->cage->testAlpha('/x/woot/0'));
     $this->assertFalse($this->cage->testAlnum('/x/woot/0'));
     $this->assertFalse($this->cage->testBetween('/x/woot/0', 0, 5));
     $this->assertFalse($this->cage->testCcnum('/x/woot/0'));
     $this->assertFalse($this->cage->testDate('/x/woot/0'));
     $this->assertFalse($this->cage->testDigits('/x/woot/0'));
     $this->assertFalse($this->cage->testEmail('/x/woot/0'));
     $this->assertFalse($this->cage->testFloat('/x/woot/0'));
     $this->assertFalse($this->cage->testGreaterThan('/x/woot/0', 0));
     $this->assertFalse($this->cage->testHex('/x/woot/0'));
     $this->assertFalse($this->cage->testHostname('/x/woot/0'));
     $this->assertFalse($this->cage->testInt('/x/woot/0'));
     $this->assertFalse($this->cage->testIp('/x/woot/0'));
     $this->assertFalse($this->cage->testLessThan('/x/woot/0', 1));
     $this->assertFalse($this->cage->testOneOf('/x/woot/0', array(null, 0, 1, 2)));
     $this->assertFalse($this->cage->testPhone('/x/woot/0'));
     $this->assertFalse($this->cage->testRegex('/x/woot/0', "/null/"));
     $this->assertFalse($this->cage->testUri('/x/woot/0'));
     $this->assertFalse($this->cage->testZip('/x/woot/0'));
 }