/**
  * Generated from @assert ('a', 'b') === FALSE.
  */
 public function testIsGreaterThan4()
 {
     $this->assertSame(FALSE, Inspekt::isGreaterThan('a', 'b'));
 }
Exemple #2
0
 /**
  * Returns value if it is greater than $min, FALSE otherwise.
  *
  * @param mixed $key
  * @param mixed $min
  * @return mixed
  *
  * @tag validator
  */
 function testGreaterThan($key, $min = NULL)
 {
     if (!$this->keyExists($key)) {
         return false;
     }
     if (Inspekt::isGreaterThan($this->_getValue($key), $min)) {
         return $this->_getValue($key);
     }
     return FALSE;
 }
Exemple #3
0
 /**
  * Returns value if it is greater than $min, FALSE otherwise.
  *
  * @param mixed $key
  * @param mixed $min
  * @return mixed
  * @throws Exception
  * @tag validator
  */
 public function testGreaterThan($key, $min = null)
 {
     $value = $this->getValueOrNull($key);
     if (!is_null($value) && Inspekt::isGreaterThan($value, $min)) {
         return $value;
     }
     return false;
 }