3. Assertions¶
3.1. Arrays¶
- array array count is int - Assert an array has a specific number of elements.
- array array count is not int - Assert an array does not have a specific number of elements.
- array array does not have item array - Assert an array does not have key and value item.
- array array does not have key int|string - Assert an array does not have a key.
- array array does not have keys array -
- array array does not have value mixed - Assert an array does not have any occurrences of the given value.
- array array has item array - Assert an array has key and value item.
- array array has items array - Assert an array has all key and value items.
- array array has key int|string - Assert an array has key, returns value.
- array array has keys array - Assert an array has several keys in any order.
- array array has value mixed - Assert an array has at least one occurrence of the given value.
- array array has values array - Assert an array has several values in any order.
- array array is associative - Assert an array is associative.
- array array is empty - Assert an array is empty (no elements).
- array array is not associative - Assert an array is not associative.
- array array is not empty - Assert an array is not empty (at least one element).
- array array is not unique - Assert that an array only has at least one element that is repeated.
- array array is unique - Assert that an array only contains unique values.
3.2. Basic¶
- mixed does not equal mixed - Assert two value do not match with no regard to type.
- mixed does not exactly equal mixed - Assert two values are of exactly the same type and value.
- mixed equals mixed - Assert values with no regard to exact data types.
- mixed exactly equals mixed - Assert two values match data type and value.
- mixed is not the same as mixed - Assert two values are of exactly the same type and value.
- mixed is the same as mixed - Assert two values match data type and value.
3.3. Booleans¶
3.4. Date and Time¶
- date int|string|DateTime is after int|string|DateTime - A date/time is after another date/time, returns original date in the same format as provided.
- date int|string|DateTime is before int|string|DateTime - A date/time is before another date/time, returns original date in the same format as provided.
3.5. Exceptions¶
- closure callable does not throw class - Assert that a specific exception is not thrown.
- closure callable does not throw exception - Assert that no exception is thrown.
- closure callable throws class - Assert a specific exception was thrown.
- closure callable throws anything except class - Assert any exception except a specific one was thrown.
- closure callable throws exactly class - Assert a specific exception was thrown.
- closure callable throws exception - Assert an exception was thrown.
3.6. Files¶
3.7. Hashing (Cryptography)¶
- hash mixed is a valid adler32 - Assert hash is an 8 digit hexadecimal.
- hash mixed is a valid crc32 - Assert hash is an 8 digit hexadecimal.
- hash mixed is a valid crc32b - Assert hash is an 8 digit hexadecimal.
- hash mixed is a valid fnv132 - Assert hash is an 8 digit hexadecimal.
- hash mixed is a valid fnv164 - Assert hash is a 16 digit hexadecimal.
- hash mixed is a valid fnv1a32 - Assert hash is an 8 digit hexadecimal.
- hash mixed is a valid fnv1a64 - Assert hash is a 16 digit hexadecimal.
- hash mixed is a valid gost - Assert hash is a 64 digit hexadecimal.
- hash mixed is a valid gost-crypto - Assert hash is a 64 digit hexadecimal.
- hash mixed is a valid haval128 - Assert hash is a 32 digit hexadecimal.
- hash mixed is a valid haval160 - Assert hash is a 40 digit hexadecimal.
- hash mixed is a valid haval192 - Assert hash is a 48 digit hexadecimal.
- hash mixed is a valid haval224 - Assert hash is a 56 digit hexadecimal.
- hash mixed is a valid haval256 - Assert hash is a 64 digit hexadecimal.
- hash mixed is a valid joaat - Assert hash is an 8 digit hexadecimal.
- hash mixed is a valid md2 - Assert hash is a 32 digit hexadecimal.
- hash mixed is a valid md4 - Assert hash is a 32 digit hexadecimal.
- hash mixed is a valid md5 - Assert hash is a 32 digit hexadecimal.
- hash mixed is a valid ripemd128 - Assert hash is a 32 digit hexadecimal.
- hash mixed is a valid ripemd160 - Assert hash is a 40 digit hexadecimal.
- hash mixed is a valid ripemd256 - Assert hash is a 64 digit hexadecimal.
- hash mixed is a valid ripemd320 - Assert hash is an 80 digit hexadecimal.
- hash mixed is a valid salsa10 - Assert hash is a 128 digit hexadecimal.
- hash mixed is a valid salsa20 - Assert hash is a 128 digit hexadecimal.
- hash mixed is a valid sha1 - Assert hash is a 40 digit hexadecimal.
- hash mixed is a valid sha224 - Assert hash is a 56 digit hexadecimal.
- hash mixed is a valid sha256 - Assert hash is a 64 digit hexadecimal.
- hash mixed is a valid sha384 - Assert hash is a 96 digit hexadecimal.
- hash mixed is a valid sha512 - Assert hash is a 128 digit hexadecimal.
- hash mixed is a valid snefru - Assert hash is a 64 digit hexadecimal.
- hash mixed is a valid snefru256 - Assert hash is a 64 digit hexadecimal.
- hash mixed is a valid tiger128 - Assert hash is a 32 digit hexadecimal.
- hash mixed is a valid tiger160 - Assert hash is a 40 digit hexadecimal.
- hash mixed is a valid tiger192 - Assert hash is a 48 digit hexadecimal.
- hash mixed is a valid whirlpool - Assert hash is a 128 digit hexadecimal.
- hash mixed is not a valid adler32 - Assert hash is not an 8 digit hexadecimal.
- hash mixed is not a valid crc32 - Assert hash is not an 8 digit hexadecimal.
- hash mixed is not a valid crc32b - Assert hash is not an 8 digit hexadecimal.
- hash mixed is not a valid fnv132 - Assert hash is not an 8 digit hexadecimal.
- hash mixed is not a valid fnv164 - Assert hash is not a 16 digit hexadecimal.
- hash mixed is not a valid fnv1a32 - Assert hash is not an 8 digit hexadecimal.
- hash mixed is not a valid fnv1a64 - Assert hash is not a 16 digit hexadecimal.
- hash mixed is not a valid gost - Assert hash is not a 64 digit hexadecimal.
- hash mixed is not a valid gost-crypto - Assert hash is not a 64 digit hexadecimal.
- hash mixed is not a valid haval128 - Assert hash is not a 32 digit hexadecimal.
- hash mixed is not a valid haval160 - Assert hash is not a 40 digit hexadecimal.
- hash mixed is not a valid haval192 - Assert hash is not a 48 digit hexadecimal.
- hash mixed is not a valid haval224 - Assert hash is not a 56 digit hexadecimal.
- hash mixed is not a valid haval256 - Assert hash is not a 64 digit hexadecimal.
- hash mixed is not a valid joaat - Assert hash is not an 8 digit hexadecimal.
- hash mixed is not a valid md2 - Assert hash is not a 32 digit hexadecimal.
- hash mixed is not a valid md4 - Assert hash is not a 32 digit hexadecimal.
- hash mixed is not a valid md5 - Assert hash is not a 32 digit hexadecimal.
- hash mixed is not a valid ripemd128 - Assert hash is not a 32 digit hexadecimal.
- hash mixed is not a valid ripemd160 - Assert hash is not a 40 digit hexadecimal.
- hash mixed is not a valid ripemd256 - Assert hash is not a 64 digit hexadecimal.
- hash mixed is not a valid ripemd320 - Assert hash is not a 80 digit hexadecimal.
- hash mixed is not a valid salsa10 - Assert hash is not a 128 digit hexadecimal.
- hash mixed is not a valid salsa20 - Assert hash is not a 128 digit hexadecimal.
- hash mixed is not a valid sha1 - Assert hash is not a 40 digit hexadecimal.
- hash mixed is not a valid sha224 - Assert hash is not a 56 digit hexadecimal.
- hash mixed is not a valid sha256 - Assert hash is not a 64 digit hexadecimal.
- hash mixed is not a valid sha384 - Assert hash is not a 96 digit hexadecimal.
- hash mixed is not a valid sha512 - Assert hash is not a 128 digit hexadecimal.
- hash mixed is not a valid snefru - Assert hash is not a 64 digit hexadecimal.
- hash mixed is not a valid snefru256 - Assert hash is not a 64 digit hexadecimal.
- hash mixed is not a valid tiger128 - Assert hash is not a 32 digit hexadecimal.
- hash mixed is not a valid tiger160 - Assert hash is not a 40 digit hexadecimal.
- hash mixed is not a valid tiger192 - Assert hash is not a 48 digit hexadecimal.
- hash mixed is not a valid whirlpool - Assert hash is not a 128 digit hexadecimal.
3.8. Numbers¶
- number is between number and number - A number must be between two values (inclusive), returns value.
- number is greater than number - A number is greater than another number.
- number is greater than or equal to number - A number is greater than or equal to another number.
- number is less than number - A number is less than another number.
- number is less than or equal to number - A number is less than or equal to another number.
- number is not between number and number - A number must not be between two values (inclusive).
- number is not within number of number - Assert two values are not close to each other.
- number is within number of number - Assert two values are close to each other.
3.9. Objects and Classes¶
- object|class is an instance of class - Assert an objects class or subclass.
- object|class is not an instance of class - Assert than an object is not a class or subclass.
- object object does not have property string - Assert that an object does not have a property.
- object object has property string - Assert that an object has a property. Returns the properties value.
3.10. Regular Expressions¶
3.11. Strings¶
- string mixed does not end with mixed - Assert a string does not end with another string.
- string mixed does not start with mixed - Assert a string does not not start (begin) with another string.
- string string contains string - A string contains a substring. Returns original string.
- string string contains case insensitive string - A string contains a substring (ignoring case-sensitivity). Returns original string.
- string string does not contain string - A string does not contain a substring. Returns original string.
- string string does not contain case insensitive string - A string does not contain a substring (ignoring case-sensitivity). Returns original string.
- string string ends with string - Assert a string ends with another string.
- string string is empty - Assert a string is zero length.
- string string is not empty - Assert a string has at least one character.
- string string starts with string - Assert a string starts (begins) with another string.
3.12. Types¶
- mixed is a bool - Assert a value is true or false.
- mixed is a boolean - Assert a value is true or false.
- mixed is a number - Assert that a value is an integer or floating-point.
- mixed is a string - Assert value is a string.
- mixed is an array - Assert a value is an array.
- mixed is an int - Assert value is an integer type.
- mixed is an integer - Assert value is an integer type.
- mixed is an object - Assert value is an object.
- mixed is not a bool - Assert a value is not true or false.
- mixed is not a boolean - Assert a value is not true or false.
- mixed is not a number - Assert that a value is not an integer or floating-point.
- mixed is not a string - Assert a value is not a string.
- mixed is not an array - Assert a value is not an array.
- mixed is not an int - Assert a value is not an integer type.
- mixed is not an integer - Assert a value is not an integer type.
- mixed is not an object - Assert a value is not an object.
- mixed is not null - Assert a value is not null.
- mixed is not numeric - Assert value is not a number or string that represents a number.
- mixed is null - Assert a value is null.
- mixed is numeric - Assert value is a number or string that represents a number.
3.13. URLs¶
- url string has fragment string - URL has fragment.
- url string has host string - URL has host.
- url string has password string - URL has password.
- url string has path string - URL has path.
- url string has port integer - URL has port.
- url string has query string - URL has query.
- url string has scheme string - URL has scheme.
- url string has user string - URL has user.
- url string is valid - Validate URL.