Assert
abstract class Assert (View source)
Methods
Asserts that two arrays are equal while only considering a list of keys.
Asserts that two arrays are equal while ignoring a list of keys.
Asserts that two arrays are identical while only considering a list of keys.
Asserts that two arrays are equal while ignoring a list of keys.
Asserts that an array has a specified key.
Asserts that an array does not have a specified key.
No description
Asserts that a haystack contains a needle.
No description
Asserts that a haystack does not contain a needle.
No description
Asserts that a haystack contains only values of type array.
Asserts that a haystack contains only values of type bool.
Asserts that a haystack contains only values of type callable.
Asserts that a haystack contains only values of type float.
Asserts that a haystack contains only values of type int.
Asserts that a haystack contains only values of type iterable.
Asserts that a haystack contains only values of type null.
Asserts that a haystack contains only values of type numeric.
Asserts that a haystack contains only values of type object.
Asserts that a haystack contains only values of type resource.
Asserts that a haystack contains only values of type closed resource.
Asserts that a haystack contains only values of type scalar.
Asserts that a haystack contains only values of type string.
Asserts that a haystack contains only instances of a specified interface or class name.
Asserts that a haystack does not contain only values of type array.
Asserts that a haystack does not contain only values of type bool.
Asserts that a haystack does not contain only values of type callable.
Asserts that a haystack does not contain only values of type float.
Asserts that a haystack does not contain only values of type int.
Asserts that a haystack does not contain only values of type iterable.
Asserts that a haystack does not contain only values of type null.
Asserts that a haystack does not contain only values of type numeric.
Asserts that a haystack does not contain only values of type object.
Asserts that a haystack does not contain only values of type resource.
Asserts that a haystack does not contain only values of type closed resource.
Asserts that a haystack does not contain only values of type scalar.
Asserts that a haystack does not contain only values of type string.
Asserts that a haystack does not contain only instances of a specified interface or class name.
Asserts the number of elements of an array, Countable or Traversable.
Asserts the number of elements of an array, Countable or Traversable.
Asserts that two variables are equal.
Asserts that two variables are equal (canonicalizing).
Asserts that two variables are equal (ignoring case).
Asserts that two variables are equal (with delta).
Asserts that two variables are not equal.
Asserts that two variables are not equal (canonicalizing).
Asserts that two variables are not equal (ignoring case).
Asserts that two variables are not equal (with delta).
No description
No description
Asserts that a variable is empty.
Asserts that a variable is not empty.
Asserts that a value is greater than another value.
Asserts that a value is greater than or equal to another value.
Asserts that a value is smaller than another value.
Asserts that a value is smaller than or equal to another value.
Asserts that the contents of one file is equal to the contents of another file.
Asserts that the contents of one file is equal to the contents of another file (canonicalizing).
Asserts that the contents of one file is equal to the contents of another file (ignoring case).
Asserts that the contents of one file is not equal to the contents of another file.
Asserts that the contents of one file is not equal to the contents of another file (canonicalizing).
Asserts that the contents of one file is not equal to the contents of another file (ignoring case).
Asserts that the contents of a string is equal to the contents of a file.
Asserts that the contents of a string is equal to the contents of a file (canonicalizing).
Asserts that the contents of a string is equal to the contents of a file (ignoring case).
Asserts that the contents of a string is not equal to the contents of a file.
Asserts that the contents of a string is not equal to the contents of a file (canonicalizing).
Asserts that the contents of a string is not equal to the contents of a file (ignoring case).
Asserts that a file/dir is readable.
Asserts that a file/dir exists and is not readable.
Asserts that a file/dir exists and is writable.
Asserts that a file/dir exists and is not writable.
Asserts that a directory exists.
Asserts that a directory does not exist.
Asserts that a directory exists and is readable.
Asserts that a directory exists and is not readable.
Asserts that a directory exists and is writable.
Asserts that a directory exists and is not writable.
Asserts that a file exists.
Asserts that a file does not exist.
Asserts that a file exists and is readable.
Asserts that a file exists and is not readable.
Asserts that a file exists and is writable.
Asserts that a file exists and is not writable.
Asserts that a condition is true.
Asserts that a condition is not true.
Asserts that a condition is false.
Asserts that a condition is not false.
Asserts that a variable is null.
Asserts that a variable is not null.
Asserts that a variable is finite.
Asserts that a variable is infinite.
Asserts that a variable is nan.
Asserts that an object has a specified property.
Asserts that an object does not have a specified property.
Asserts that two variables have the same type and value.
Asserts that two variables do not have the same type and value.
Asserts that a variable is of a given type.
Asserts that a variable is not of a given type.
Asserts that a variable is of type array.
Asserts that a variable is of type bool.
Asserts that a variable is of type float.
Asserts that a variable is of type int.
Asserts that a variable is of type numeric.
Asserts that a variable is of type object.
Asserts that a variable is of type resource.
Asserts that a variable is of type resource and is closed.
Asserts that a variable is of type string.
Asserts that a variable is of type scalar.
Asserts that a variable is of type callable.
Asserts that a variable is of type iterable.
Asserts that a variable is not of type array.
Asserts that a variable is not of type bool.
Asserts that a variable is not of type float.
Asserts that a variable is not of type int.
Asserts that a variable is not of type numeric.
Asserts that a variable is not of type object.
Asserts that a variable is not of type resource.
Asserts that a variable is not of type resource.
Asserts that a variable is not of type string.
Asserts that a variable is not of type scalar.
Asserts that a variable is not of type callable.
Asserts that a variable is not of type iterable.
Asserts that a string matches a given regular expression.
Asserts that a string does not match a given regular expression.
Assert that the size of two arrays (or Countable or Traversable objects)
is the same.
Assert that the size of two arrays (or Countable or Traversable objects)
is not the same.
No description
Asserts that two strings are equal except for line endings.
Asserts that a string matches a given format string.
Asserts that a string matches a given format string.
Asserts that a string matches a given format string.
Asserts that a string matches a given format file.
Asserts that a string starts with a given prefix.
Asserts that a string starts not with a given prefix.
No description
No description
No description
No description
Asserts that a string ends with a given suffix.
Asserts that a string ends not with a given suffix.
Asserts that two XML files are equal.
Asserts that two XML files are not equal.
Asserts that two XML documents are equal.
Asserts that two XML documents are not equal.
Asserts that two XML documents are equal.
Asserts that two XML documents are not equal.
Evaluates a PHPUnit\Framework\Constraint matcher object.
Asserts that a string is a valid JSON string.
Asserts that two given JSON encoded objects or arrays are equal.
Asserts that two given JSON encoded objects or arrays are not equal.
Asserts that the generated JSON encoded object and the content of the given file are equal.
Asserts that the generated JSON encoded object and the content of the given file are not equal.
Asserts that two JSON files are equal.
Asserts that two JSON files are not equal.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Fails a test with the given message.
Mark the test as incomplete.
Mark the test as skipped.
Return the current assertion count.
Reset the assertion counter.
Details
final static void
assertArrayIsEqualToArrayOnlyConsideringListOfKeys(array $expected, array $actual, array $keysToBeConsidered, string $message = '')
Asserts that two arrays are equal while only considering a list of keys.
final static void
assertArrayIsEqualToArrayIgnoringListOfKeys(array $expected, array $actual, array $keysToBeIgnored, string $message = '')
Asserts that two arrays are equal while ignoring a list of keys.
final static void
assertArrayIsIdenticalToArrayOnlyConsideringListOfKeys(array $expected, array $actual, array $keysToBeConsidered, string $message = '')
Asserts that two arrays are identical while only considering a list of keys.
final static void
assertArrayIsIdenticalToArrayIgnoringListOfKeys(array $expected, array $actual, array $keysToBeIgnored, string $message = '')
Asserts that two arrays are equal while ignoring a list of keys.
final static void
assertArrayHasKey(mixed $key, array|ArrayAccess $array, string $message = '')
Asserts that an array has a specified key.
final static void
assertArrayNotHasKey(mixed $key, array|ArrayAccess $array, string $message = '')
Asserts that an array does not have a specified key.
final static void
assertIsList(mixed $array, string $message = '')
No description
final static void
assertContains(mixed $needle, iterable $haystack, string $message = '')
Asserts that a haystack contains a needle.
final static void
assertContainsEquals(mixed $needle, iterable $haystack, string $message = '')
No description
final static void
assertNotContains(mixed $needle, iterable $haystack, string $message = '')
Asserts that a haystack does not contain a needle.
final static void
assertNotContainsEquals(mixed $needle, iterable $haystack, string $message = '')
No description
final static void
assertContainsOnlyArray(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type array.
final static void
assertContainsOnlyBool(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type bool.
final static void
assertContainsOnlyCallable(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type callable.
final static void
assertContainsOnlyFloat(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type float.
final static void
assertContainsOnlyInt(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type int.
final static void
assertContainsOnlyIterable(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type iterable.
final static void
assertContainsOnlyNull(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type null.
final static void
assertContainsOnlyNumeric(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type numeric.
final static void
assertContainsOnlyObject(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type object.
final static void
assertContainsOnlyResource(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type resource.
final static void
assertContainsOnlyClosedResource(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type closed resource.
final static void
assertContainsOnlyScalar(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type scalar.
final static void
assertContainsOnlyString(iterable $haystack, string $message = '')
Asserts that a haystack contains only values of type string.
final static void
assertContainsOnlyInstancesOf(string $className, iterable $haystack, string $message = '')
Asserts that a haystack contains only instances of a specified interface or class name.
final static void
assertContainsNotOnlyArray(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type array.
final static void
assertContainsNotOnlyBool(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type bool.
final static void
assertContainsNotOnlyCallable(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type callable.
final static void
assertContainsNotOnlyFloat(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type float.
final static void
assertContainsNotOnlyInt(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type int.
final static void
assertContainsNotOnlyIterable(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type iterable.
final static void
assertContainsNotOnlyNull(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type null.
final static void
assertContainsNotOnlyNumeric(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type numeric.
final static void
assertContainsNotOnlyObject(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type object.
final static void
assertContainsNotOnlyResource(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type resource.
final static void
assertContainsNotOnlyClosedResource(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type closed resource.
final static void
assertContainsNotOnlyScalar(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type scalar.
final static void
assertContainsNotOnlyString(iterable $haystack, string $message = '')
Asserts that a haystack does not contain only values of type string.
final static void
assertContainsNotOnlyInstancesOf(string $className, iterable $haystack, string $message = '')
Asserts that a haystack does not contain only instances of a specified interface or class name.
final static void
assertCount(int $expectedCount, Countable|iterable $haystack, string $message = '')
Asserts the number of elements of an array, Countable or Traversable.
final static void
assertNotCount(int $expectedCount, Countable|iterable $haystack, string $message = '')
Asserts the number of elements of an array, Countable or Traversable.
final static void
assertEquals(mixed $expected, mixed $actual, string $message = '')
Asserts that two variables are equal.
final static void
assertEqualsCanonicalizing(mixed $expected, mixed $actual, string $message = '')
Asserts that two variables are equal (canonicalizing).
final static void
assertEqualsIgnoringCase(mixed $expected, mixed $actual, string $message = '')
Asserts that two variables are equal (ignoring case).
final static void
assertEqualsWithDelta(mixed $expected, mixed $actual, float $delta, string $message = '')
Asserts that two variables are equal (with delta).
final static void
assertNotEquals(mixed $expected, mixed $actual, string $message = '')
Asserts that two variables are not equal.
final static void
assertNotEqualsCanonicalizing(mixed $expected, mixed $actual, string $message = '')
Asserts that two variables are not equal (canonicalizing).
final static void
assertNotEqualsIgnoringCase(mixed $expected, mixed $actual, string $message = '')
Asserts that two variables are not equal (ignoring case).
final static void
assertNotEqualsWithDelta(mixed $expected, mixed $actual, float $delta, string $message = '')
Asserts that two variables are not equal (with delta).
final static void
assertObjectEquals(object $expected, object $actual, string $method = 'equals', string $message = '')
No description
final static void
assertObjectNotEquals(object $expected, object $actual, string $method = 'equals', string $message = '')
No description
final static void
assertEmpty(mixed $actual, string $message = '')
Asserts that a variable is empty.
final static void
assertNotEmpty(mixed $actual, string $message = '')
Asserts that a variable is not empty.
final static void
assertGreaterThan(mixed $minimum, mixed $actual, string $message = '')
Asserts that a value is greater than another value.
final static void
assertGreaterThanOrEqual(mixed $minimum, mixed $actual, string $message = '')
Asserts that a value is greater than or equal to another value.
final static void
assertLessThan(mixed $maximum, mixed $actual, string $message = '')
Asserts that a value is smaller than another value.
final static void
assertLessThanOrEqual(mixed $maximum, mixed $actual, string $message = '')
Asserts that a value is smaller than or equal to another value.
final static void
assertFileEquals(string $expected, string $actual, string $message = '')
Asserts that the contents of one file is equal to the contents of another file.
final static void
assertFileEqualsCanonicalizing(string $expected, string $actual, string $message = '')
Asserts that the contents of one file is equal to the contents of another file (canonicalizing).
final static void
assertFileEqualsIgnoringCase(string $expected, string $actual, string $message = '')
Asserts that the contents of one file is equal to the contents of another file (ignoring case).
final static void
assertFileNotEquals(string $expected, string $actual, string $message = '')
Asserts that the contents of one file is not equal to the contents of another file.
final static void
assertFileNotEqualsCanonicalizing(string $expected, string $actual, string $message = '')
Asserts that the contents of one file is not equal to the contents of another file (canonicalizing).
final static void
assertFileNotEqualsIgnoringCase(string $expected, string $actual, string $message = '')
Asserts that the contents of one file is not equal to the contents of another file (ignoring case).
final static void
assertStringEqualsFile(string $expectedFile, string $actualString, string $message = '')
Asserts that the contents of a string is equal to the contents of a file.
final static void
assertStringEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = '')
Asserts that the contents of a string is equal to the contents of a file (canonicalizing).
final static void
assertStringEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = '')
Asserts that the contents of a string is equal to the contents of a file (ignoring case).
final static void
assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = '')
Asserts that the contents of a string is not equal to the contents of a file.
final static void
assertStringNotEqualsFileCanonicalizing(string $expectedFile, string $actualString, string $message = '')
Asserts that the contents of a string is not equal to the contents of a file (canonicalizing).
final static void
assertStringNotEqualsFileIgnoringCase(string $expectedFile, string $actualString, string $message = '')
Asserts that the contents of a string is not equal to the contents of a file (ignoring case).
final static void
assertIsReadable(string $filename, string $message = '')
Asserts that a file/dir is readable.
final static void
assertIsNotReadable(string $filename, string $message = '')
Asserts that a file/dir exists and is not readable.
final static void
assertIsWritable(string $filename, string $message = '')
Asserts that a file/dir exists and is writable.
final static void
assertIsNotWritable(string $filename, string $message = '')
Asserts that a file/dir exists and is not writable.
final static void
assertDirectoryExists(string $directory, string $message = '')
Asserts that a directory exists.
final static void
assertDirectoryDoesNotExist(string $directory, string $message = '')
Asserts that a directory does not exist.
final static void
assertDirectoryIsReadable(string $directory, string $message = '')
Asserts that a directory exists and is readable.
final static void
assertDirectoryIsNotReadable(string $directory, string $message = '')
Asserts that a directory exists and is not readable.
final static void
assertDirectoryIsWritable(string $directory, string $message = '')
Asserts that a directory exists and is writable.
final static void
assertDirectoryIsNotWritable(string $directory, string $message = '')
Asserts that a directory exists and is not writable.
final static void
assertFileExists(string $filename, string $message = '')
Asserts that a file exists.
final static void
assertFileDoesNotExist(string $filename, string $message = '')
Asserts that a file does not exist.
final static void
assertFileIsReadable(string $file, string $message = '')
Asserts that a file exists and is readable.
final static void
assertFileIsNotReadable(string $file, string $message = '')
Asserts that a file exists and is not readable.
final static void
assertFileIsWritable(string $file, string $message = '')
Asserts that a file exists and is writable.
final static void
assertFileIsNotWritable(string $file, string $message = '')
Asserts that a file exists and is not writable.
final static void
assertTrue(mixed $condition, string $message = '')
Asserts that a condition is true.
final static void
assertNotTrue(mixed $condition, string $message = '')
Asserts that a condition is not true.
final static void
assertFalse(mixed $condition, string $message = '')
Asserts that a condition is false.
final static void
assertNotFalse(mixed $condition, string $message = '')
Asserts that a condition is not false.
final static void
assertNull(mixed $actual, string $message = '')
Asserts that a variable is null.
final static void
assertNotNull(mixed $actual, string $message = '')
Asserts that a variable is not null.
final static void
assertFinite(mixed $actual, string $message = '')
Asserts that a variable is finite.
final static void
assertInfinite(mixed $actual, string $message = '')
Asserts that a variable is infinite.
final static void
assertNan(mixed $actual, string $message = '')
Asserts that a variable is nan.
final static void
assertObjectHasProperty(string $propertyName, object $object, string $message = '')
Asserts that an object has a specified property.
final static void
assertObjectNotHasProperty(string $propertyName, object $object, string $message = '')
Asserts that an object does not have a specified property.
final static void
assertSame(mixed $expected, mixed $actual, string $message = '')
Asserts that two variables have the same type and value.
Used on objects, it asserts that two variables reference the same object.
final static void
assertNotSame(mixed $expected, mixed $actual, string $message = '')
Asserts that two variables do not have the same type and value.
Used on objects, it asserts that two variables do not reference the same object.
final static void
assertInstanceOf(string $expected, mixed $actual, string $message = '')
Asserts that a variable is of a given type.
final static void
assertNotInstanceOf(string $expected, mixed $actual, string $message = '')
Asserts that a variable is not of a given type.
final static void
assertIsArray(mixed $actual, string $message = '')
Asserts that a variable is of type array.
final static void
assertIsBool(mixed $actual, string $message = '')
Asserts that a variable is of type bool.
final static void
assertIsFloat(mixed $actual, string $message = '')
Asserts that a variable is of type float.
final static void
assertIsInt(mixed $actual, string $message = '')
Asserts that a variable is of type int.
final static void
assertIsNumeric(mixed $actual, string $message = '')
Asserts that a variable is of type numeric.
final static void
assertIsObject(mixed $actual, string $message = '')
Asserts that a variable is of type object.
final static void
assertIsResource(mixed $actual, string $message = '')
Asserts that a variable is of type resource.
final static void
assertIsClosedResource(mixed $actual, string $message = '')
Asserts that a variable is of type resource and is closed.
final static void
assertIsString(mixed $actual, string $message = '')
Asserts that a variable is of type string.
final static void
assertIsScalar(mixed $actual, string $message = '')
Asserts that a variable is of type scalar.
final static void
assertIsCallable(mixed $actual, string $message = '')
Asserts that a variable is of type callable.
final static void
assertIsIterable(mixed $actual, string $message = '')
Asserts that a variable is of type iterable.
final static void
assertIsNotArray(mixed $actual, string $message = '')
Asserts that a variable is not of type array.
final static void
assertIsNotBool(mixed $actual, string $message = '')
Asserts that a variable is not of type bool.
final static void
assertIsNotFloat(mixed $actual, string $message = '')
Asserts that a variable is not of type float.
final static void
assertIsNotInt(mixed $actual, string $message = '')
Asserts that a variable is not of type int.
final static void
assertIsNotNumeric(mixed $actual, string $message = '')
Asserts that a variable is not of type numeric.
final static void
assertIsNotObject(mixed $actual, string $message = '')
Asserts that a variable is not of type object.
final static void
assertIsNotResource(mixed $actual, string $message = '')
Asserts that a variable is not of type resource.
final static void
assertIsNotClosedResource(mixed $actual, string $message = '')
Asserts that a variable is not of type resource.
final static void
assertIsNotString(mixed $actual, string $message = '')
Asserts that a variable is not of type string.
final static void
assertIsNotScalar(mixed $actual, string $message = '')
Asserts that a variable is not of type scalar.
final static void
assertIsNotCallable(mixed $actual, string $message = '')
Asserts that a variable is not of type callable.
final static void
assertIsNotIterable(mixed $actual, string $message = '')
Asserts that a variable is not of type iterable.
final static void
assertMatchesRegularExpression(string $pattern, string $string, string $message = '')
Asserts that a string matches a given regular expression.
final static void
assertDoesNotMatchRegularExpression(string $pattern, string $string, string $message = '')
Asserts that a string does not match a given regular expression.
final static void
assertSameSize(Countable|iterable $expected, Countable|iterable $actual, string $message = '')
Assert that the size of two arrays (or Countable or Traversable objects)
is the same.
final static void
assertNotSameSize(Countable|iterable $expected, Countable|iterable $actual, string $message = '')
Assert that the size of two arrays (or Countable or Traversable objects)
is not the same.
final static void
assertStringContainsStringIgnoringLineEndings(string $needle, string $haystack, string $message = '')
No description
final static void
assertStringEqualsStringIgnoringLineEndings(string $expected, string $actual, string $message = '')
Asserts that two strings are equal except for line endings.
final static void
assertFileMatchesFormat(string $format, string $actualFile, string $message = '')
Asserts that a string matches a given format string.
final static void
assertFileMatchesFormatFile(string $formatFile, string $actualFile, string $message = '')
Asserts that a string matches a given format string.
final static void
assertStringMatchesFormat(string $format, string $string, string $message = '')
Asserts that a string matches a given format string.
final static void
assertStringMatchesFormatFile(string $formatFile, string $string, string $message = '')
Asserts that a string matches a given format file.
final static void
assertStringStartsWith(string $prefix, string $string, string $message = '')
Asserts that a string starts with a given prefix.
final static void
assertStringStartsNotWith(string $prefix, string $string, string $message = '')
Asserts that a string starts not with a given prefix.
final static void
assertStringContainsString(string $needle, string $haystack, string $message = '')
No description
final static void
assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = '')
No description
final static void
assertStringNotContainsString(string $needle, string $haystack, string $message = '')
No description
final static void
assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = '')
No description
final static void
assertStringEndsWith(string $suffix, string $string, string $message = '')
Asserts that a string ends with a given suffix.
final static void
assertStringEndsNotWith(string $suffix, string $string, string $message = '')
Asserts that a string ends not with a given suffix.
final static void
assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = '')
Asserts that two XML files are equal.
final static void
assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = '')
Asserts that two XML files are not equal.
final static void
assertXmlStringEqualsXmlFile(string $expectedFile, string $actualXml, string $message = '')
Asserts that two XML documents are equal.
final static void
assertXmlStringNotEqualsXmlFile(string $expectedFile, string $actualXml, string $message = '')
Asserts that two XML documents are not equal.
final static void
assertXmlStringEqualsXmlString(string $expectedXml, string $actualXml, string $message = '')
Asserts that two XML documents are equal.
final static void
assertXmlStringNotEqualsXmlString(string $expectedXml, string $actualXml, string $message = '')
Asserts that two XML documents are not equal.
final static void
assertThat(mixed $value, Constraint $constraint, string $message = '')
Evaluates a PHPUnit\Framework\Constraint matcher object.
final static void
assertJson(string $actual, string $message = '')
Asserts that a string is a valid JSON string.
final static void
assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = '')
Asserts that two given JSON encoded objects or arrays are equal.
final static void
assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson, string $message = '')
Asserts that two given JSON encoded objects or arrays are not equal.
final static void
assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = '')
Asserts that the generated JSON encoded object and the content of the given file are equal.
final static void
assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = '')
Asserts that the generated JSON encoded object and the content of the given file are not equal.
final static void
assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = '')
Asserts that two JSON files are equal.
final static void
assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = '')
Asserts that two JSON files are not equal.
final static LogicalAnd
logicalAnd(mixed ...$constraints)
No description
final static LogicalOr
logicalOr(mixed ...$constraints)
No description
final static LogicalNot
logicalNot(Constraint $constraint)
No description
final static LogicalXor
logicalXor(mixed ...$constraints)
No description
final static IsAnything
anything()
No description
final static IsTrue
isTrue()
No description
final static Callback
callback(callable $callback)
No description
final static IsFalse
isFalse()
No description
final static IsJson
isJson()
No description
final static IsNull
isNull()
No description
final static IsFinite
isFinite()
No description
final static IsInfinite
isInfinite()
No description
final static IsNan
isNan()
No description
final static TraversableContainsEqual
containsEqual(mixed $value)
No description
final static TraversableContainsIdentical
containsIdentical(mixed $value)
No description
final static TraversableContainsOnly
containsOnlyArray()
No description
final static TraversableContainsOnly
containsOnlyBool()
No description
final static TraversableContainsOnly
containsOnlyCallable()
No description
final static TraversableContainsOnly
containsOnlyFloat()
No description
final static TraversableContainsOnly
containsOnlyInt()
No description
final static TraversableContainsOnly
containsOnlyIterable()
No description
final static TraversableContainsOnly
containsOnlyNull()
No description
final static TraversableContainsOnly
containsOnlyNumeric()
No description
final static TraversableContainsOnly
containsOnlyObject()
No description
final static TraversableContainsOnly
containsOnlyResource()
No description
final static TraversableContainsOnly
containsOnlyClosedResource()
No description
final static TraversableContainsOnly
containsOnlyScalar()
No description
final static TraversableContainsOnly
containsOnlyString()
No description
final static TraversableContainsOnly
containsOnlyInstancesOf(string $className)
No description
final static ArrayHasKey
arrayHasKey(mixed $key)
No description
final static IsList
isList()
No description
final static IsEqual
equalTo(mixed $value)
No description
final static IsEqualCanonicalizing
equalToCanonicalizing(mixed $value)
No description
final static IsEqualIgnoringCase
equalToIgnoringCase(mixed $value)
No description
final static IsEqualWithDelta
equalToWithDelta(mixed $value, float $delta)
No description
final static IsEmpty
isEmpty()
No description
final static IsWritable
isWritable()
No description
final static IsReadable
isReadable()
No description
final static DirectoryExists
directoryExists()
No description
final static FileExists
fileExists()
No description
final static GreaterThan
greaterThan(mixed $value)
No description
final static LogicalOr
greaterThanOrEqual(mixed $value)
No description
final static IsIdentical
identicalTo(mixed $value)
No description
final static IsInstanceOf
isInstanceOf(string $className)
No description
final static IsType
isArray()
No description
final static IsType
isBool()
No description
final static IsType
isCallable()
No description
final static IsType
isFloat()
No description
final static IsType
isInt()
No description
final static IsType
isIterable()
No description
final static IsType
isNumeric()
No description
final static IsType
isObject()
No description
final static IsType
isResource()
No description
final static IsType
isClosedResource()
No description
final static IsType
isScalar()
No description
final static IsType
isString()
No description
final static LessThan
lessThan(mixed $value)
No description
final static LogicalOr
lessThanOrEqual(mixed $value)
No description
final static RegularExpression
matchesRegularExpression(string $pattern)
No description
final static StringMatchesFormatDescription
matches(string $string)
No description
final static StringStartsWith
stringStartsWith(string $prefix)
No description
final static StringContains
stringContains(string $string, bool $case = true)
No description
final static StringEndsWith
stringEndsWith(string $suffix)
No description
final static StringEqualsStringIgnoringLineEndings
stringEqualsStringIgnoringLineEndings(string $string)
No description
final static Count
countOf(int $count)
No description
final static ObjectEquals
objectEquals(object $object, string $method = 'equals')
No description
final static never
fail(string $message = '')
Fails a test with the given message.
final static never
markTestIncomplete(string $message = '')
Mark the test as incomplete.
final static never
markTestSkipped(string $message = '')
Mark the test as skipped.
final static int
getCount()
Return the current assertion count.
final static void
resetCount()
Reset the assertion counter.