Esempio n. 1
0
 /**
  * Matches if value is not null.
  *
  * @factory
  */
 public static function notNullValue()
 {
     if (!self::$_NOT_INSTANCE) {
         self::$_NOT_INSTANCE = Hamcrest_Core_IsNot::not(self::nullValue());
     }
     return self::$_NOT_INSTANCE;
 }
Esempio n. 2
0
 /**
  * Matches if value is null or a zero-length string.
  *
  * @factory nullOrEmptyString
  */
 public static function isEmptyOrNullString()
 {
     if (!self::$_NULL_OR_EMPTY_INSTANCE) {
         self::$_NULL_OR_EMPTY_INSTANCE = Hamcrest_Core_AnyOf::anyOf(Hamcrest_Core_IsNull::nullvalue(), self::isEmptyString());
     }
     return self::$_NULL_OR_EMPTY_INSTANCE;
 }
Esempio n. 3
0
 protected function createMatcher()
 {
     return Hamcrest_Core_IsNull::nullValue();
 }
Esempio n. 4
0
/**
 * Matches if value is not null.
 */
function notNullValue()
{
    require_once 'Hamcrest/Core/IsNull.php';
    return Hamcrest_Core_IsNull::notNullValue();
}