PHPUnit_Framework_Assert
class PHPUnit_Framework_Assert (View source)
A set of assertion methods.
Methods
Asserts that an array has a specified key.
Asserts that an array has a specified subset.
Asserts that an array does not have a specified key.
Asserts that a haystack contains a needle.
Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object contains a needle.
Asserts that a haystack does not contain a needle.
Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object does not contain a needle.
Asserts that a haystack contains only values of a given type.
Asserts that a haystack contains only instances of a given classname
Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object contains only values of a given type.
Asserts that a haystack does not contain only values of a given type.
Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object does not contain only values of a given type.
Asserts the number of elements of an array, Countable or Traversable.
Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
Asserts the number of elements of an array, Countable or Traversable.
Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
Asserts that two variables are equal.
Asserts that a variable is equal to an attribute of an object.
Asserts that two variables are not equal.
Asserts that a variable is not equal to an attribute of an object.
Asserts that a variable is empty.
Asserts that a static attribute of a class or an attribute of an object is empty.
Asserts that a variable is not empty.
Asserts that a static attribute of a class or an attribute of an object is not empty.
Asserts that a value is greater than another value.
Asserts that an attribute is greater than another value.
Asserts that a value is greater than or equal to another value.
Asserts that an attribute is greater than or equal to another value.
Asserts that a value is smaller than another value.
Asserts that an attribute is smaller than another value.
Asserts that a value is smaller than or equal to another value.
Asserts that an attribute 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 not equal to the contents of another file.
Asserts that the contents of a string is equal to the contents of a file.
Asserts that the contents of a string is not equal to the contents of a file.
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 a class has a specified attribute.
Asserts that a class does not have a specified attribute.
Asserts that a class has a specified static attribute.
Asserts that a class does not have a specified static attribute.
Asserts that an object has a specified attribute.
Asserts that an object does not have a specified attribute.
Asserts that two variables have the same type and value.
Asserts that a variable and an attribute of an object have the same type and value.
Asserts that two variables do not have the same type and value.
Asserts that a variable and an attribute of an object do not have the same type and value.
Asserts that a variable is of a given type.
Asserts that an attribute is of a given type.
Asserts that a variable is not of a given type.
Asserts that an attribute is of a given type.
Asserts that a variable is of a given type.
Asserts that an attribute is of a given type.
Asserts that a variable is not of a given type.
Asserts that an attribute is of a given type.
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.
Asserts that a string matches a given format string.
Asserts that a string does not match a given format string.
Asserts that a string matches a given format file.
Asserts that a string does not match a given format string.
Asserts that a string starts with a given prefix.
Asserts that a string starts not with a given prefix.
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.
Asserts that a hierarchy of DOMElements matches.
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.
Returns a PHPUnit_Framework_Constraint_And matcher object.
Returns a PHPUnit_Framework_Constraint_Or matcher object.
Returns a PHPUnit_Framework_Constraint_Not matcher object.
Returns a PHPUnit_Framework_Constraint_Xor matcher object.
Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.
Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
Returns a PHPUnit_Framework_Constraint_Callback matcher object.
Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.
Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
Returns a PHPUnit_Framework_Constraint_IsFinite matcher object.
Returns a PHPUnit_Framework_Constraint_IsInfinite matcher object.
Returns a PHPUnit_Framework_Constraint_IsNan matcher object.
Returns a PHPUnit_Framework_Constraint_Attribute matcher object.
Returns a PHPUnit_Framework_Constraint_TraversableContains matcher object.
Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.
Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.
Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.
Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.
Returns a PHPUnit_Framework_Constraint_IsEqual matcher object that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher object.
Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.
Returns a PHPUnit_Framework_Constraint_IsWritable matcher object.
Returns a PHPUnit_Framework_Constraint_IsReadable matcher object.
Returns a PHPUnit_Framework_Constraint_DirectoryExists matcher object.
Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.
Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_GreaterThan matcher object.
Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.
Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher object.
Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.
Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.
Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.
Returns a PHPUnit_Framework_Constraint_IsType matcher object.
Returns a PHPUnit_Framework_Constraint_LessThan matcher object.
Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_LessThan matcher object.
Returns a PHPUnit_Framework_Constraint_PCREMatch matcher object.
Returns a PHPUnit_Framework_Constraint_StringMatches matcher object.
Returns a PHPUnit_Framework_Constraint_StringStartsWith matcher object.
Returns a PHPUnit_Framework_Constraint_StringContains matcher object.
Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.
Returns a PHPUnit_Framework_Constraint_Count matcher object.
Fails a test with the given message.
Returns the value of an attribute of a class or an object.
Returns the value of a static attribute.
Returns the value of an object's attribute.
Mark the test as incomplete.
Mark the test as skipped.
Return the current assertion count.
Reset the assertion counter.
Details
at line 28
static
assertArrayHasKey(mixed $key, array|ArrayAccess $array, string $message = '')
Asserts that an array has a specified key.
at line 57
static
assertArraySubset(array|ArrayAccess $subset, array|ArrayAccess $array, bool $strict = false, string $message = '')
Asserts that an array has a specified subset.
at line 85
static
assertArrayNotHasKey(mixed $key, array|ArrayAccess $array, string $message = '')
Asserts that an array does not have a specified key.
at line 118
static
assertContains(mixed $needle, mixed $haystack, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false)
Asserts that a haystack contains a needle.
at line 161
static
assertAttributeContains(mixed $needle, string $haystackAttributeName, string|object $haystackClassOrObject, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false)
Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object contains a needle.
at line 183
static
assertNotContains(mixed $needle, mixed $haystack, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false)
Asserts that a haystack does not contain a needle.
at line 230
static
assertAttributeNotContains(mixed $needle, string $haystackAttributeName, string|object $haystackClassOrObject, string $message = '', bool $ignoreCase = false, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false)
Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object does not contain a needle.
at line 250
static
assertContainsOnly(string $type, mixed $haystack, bool $isNativeType = null, string $message = '')
Asserts that a haystack contains only values of a given type.
at line 281
static
assertContainsOnlyInstancesOf(string $classname, array|Traversable $haystack, string $message = '')
Asserts that a haystack contains only instances of a given classname
at line 311
static
assertAttributeContainsOnly(string $type, string $haystackAttributeName, string|object $haystackClassOrObject, bool $isNativeType = null, string $message = '')
Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object contains only values of a given type.
at line 329
static
assertNotContainsOnly(string $type, mixed $haystack, bool $isNativeType = null, string $message = '')
Asserts that a haystack does not contain only values of a given type.
at line 366
static
assertAttributeNotContainsOnly(string $type, string $haystackAttributeName, string|object $haystackClassOrObject, bool $isNativeType = null, string $message = '')
Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object does not contain only values of a given type.
at line 383
static
assertCount(int $expectedCount, mixed $haystack, string $message = '')
Asserts the number of elements of an array, Countable or Traversable.
at line 411
static
assertAttributeCount(int $expectedCount, string $haystackAttributeName, string|object $haystackClassOrObject, string $message = '')
Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
at line 427
static
assertNotCount(int $expectedCount, mixed $haystack, string $message = '')
Asserts the number of elements of an array, Countable or Traversable.
at line 455
static
assertAttributeNotCount(int $expectedCount, string $haystackAttributeName, string|object $haystackClassOrObject, string $message = '')
Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
at line 475
static
assertEquals(mixed $expected, mixed $actual, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false)
Asserts that two variables are equal.
at line 500
static
assertAttributeEquals(mixed $expected, string $actualAttributeName, string|object $actualClassOrObject, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false)
Asserts that a variable is equal to an attribute of an object.
at line 524
static
assertNotEquals(mixed $expected, mixed $actual, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false)
Asserts that two variables are not equal.
at line 551
static
assertAttributeNotEquals(mixed $expected, string $actualAttributeName, string|object $actualClassOrObject, string $message = '', float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false)
Asserts that a variable is not equal to an attribute of an object.
at line 572
static
assertEmpty(mixed $actual, string $message = '')
Asserts that a variable is empty.
at line 585
static
assertAttributeEmpty(string $haystackAttributeName, string|object $haystackClassOrObject, string $message = '')
Asserts that a static attribute of a class or an attribute of an object is empty.
at line 601
static
assertNotEmpty(mixed $actual, string $message = '')
Asserts that a variable is not empty.
at line 614
static
assertAttributeNotEmpty(string $haystackAttributeName, string|object $haystackClassOrObject, string $message = '')
Asserts that a static attribute of a class or an attribute of an object is not empty.
at line 629
static
assertGreaterThan(mixed $expected, mixed $actual, string $message = '')
Asserts that a value is greater than another value.
at line 642
static
assertAttributeGreaterThan(mixed $expected, string $actualAttributeName, string|object $actualClassOrObject, string $message = '')
Asserts that an attribute is greater than another value.
at line 658
static
assertGreaterThanOrEqual(mixed $expected, mixed $actual, string $message = '')
Asserts that a value is greater than or equal to another value.
at line 675
static
assertAttributeGreaterThanOrEqual(mixed $expected, string $actualAttributeName, string|object $actualClassOrObject, string $message = '')
Asserts that an attribute is greater than or equal to another value.
at line 691
static
assertLessThan(mixed $expected, mixed $actual, string $message = '')
Asserts that a value is smaller than another value.
at line 704
static
assertAttributeLessThan(mixed $expected, string $actualAttributeName, string|object $actualClassOrObject, string $message = '')
Asserts that an attribute is smaller than another value.
at line 720
static
assertLessThanOrEqual(mixed $expected, mixed $actual, string $message = '')
Asserts that a value is smaller than or equal to another value.
at line 733
static
assertAttributeLessThanOrEqual(mixed $expected, string $actualAttributeName, string|object $actualClassOrObject, string $message = '')
Asserts that an attribute is smaller than or equal to another value.
at line 752
static
assertFileEquals(string $expected, string $actual, string $message = '', bool $canonicalize = false, bool $ignoreCase = false)
Asserts that the contents of one file is equal to the contents of another file.
at line 778
static
assertFileNotEquals(string $expected, string $actual, string $message = '', bool $canonicalize = false, bool $ignoreCase = false)
Asserts that the contents of one file is not equal to the contents of another file.
at line 804
static
assertStringEqualsFile(string $expectedFile, string $actualString, string $message = '', bool $canonicalize = false, bool $ignoreCase = false)
Asserts that the contents of a string is equal to the contents of a file.
at line 829
static
assertStringNotEqualsFile(string $expectedFile, string $actualString, string $message = '', bool $canonicalize = false, bool $ignoreCase = false)
Asserts that the contents of a string is not equal to the contents of a file.
at line 850
static
assertIsReadable(string $filename, string $message = '')
Asserts that a file/dir is readable.
at line 867
static
assertNotIsReadable(string $filename, string $message = '')
Asserts that a file/dir exists and is not readable.
at line 886
static
assertIsWritable(string $filename, string $message = '')
Asserts that a file/dir exists and is writable.
at line 903
static
assertNotIsWritable(string $filename, string $message = '')
Asserts that a file/dir exists and is not writable.
at line 922
static
assertDirectoryExists(string $directory, string $message = '')
Asserts that a directory exists.
at line 939
static
assertDirectoryNotExists(string $directory, string $message = '')
Asserts that a directory does not exist.
at line 958
static
assertDirectoryIsReadable(string $directory, string $message = '')
Asserts that a directory exists and is readable.
at line 970
static
assertDirectoryNotIsReadable(string $directory, string $message = '')
Asserts that a directory exists and is not readable.
at line 982
static
assertDirectoryIsWritable(string $directory, string $message = '')
Asserts that a directory exists and is writable.
at line 994
static
assertDirectoryNotIsWritable(string $directory, string $message = '')
Asserts that a directory exists and is not writable.
at line 1006
static
assertFileExists(string $filename, string $message = '')
Asserts that a file exists.
at line 1023
static
assertFileNotExists(string $filename, string $message = '')
Asserts that a file does not exist.
at line 1042
static
assertFileIsReadable(string $file, string $message = '')
Asserts that a file exists and is readable.
at line 1054
static
assertFileNotIsReadable(string $file, string $message = '')
Asserts that a file exists and is not readable.
at line 1066
static
assertFileIsWritable(string $file, string $message = '')
Asserts that a file exists and is writable.
at line 1078
static
assertFileNotIsWritable(string $file, string $message = '')
Asserts that a file exists and is not writable.
at line 1092
static
assertTrue(bool $condition, string $message = '')
Asserts that a condition is true.
at line 1105
static
assertNotTrue(bool $condition, string $message = '')
Asserts that a condition is not true.
at line 1118
static
assertFalse(bool $condition, string $message = '')
Asserts that a condition is false.
at line 1131
static
assertNotFalse(bool $condition, string $message = '')
Asserts that a condition is not false.
at line 1142
static
assertNull(mixed $actual, string $message = '')
Asserts that a variable is null.
at line 1153
static
assertNotNull(mixed $actual, string $message = '')
Asserts that a variable is not null.
at line 1164
static
assertFinite(mixed $actual, string $message = '')
Asserts that a variable is finite.
at line 1175
static
assertInfinite(mixed $actual, string $message = '')
Asserts that a variable is infinite.
at line 1186
static
assertNan(mixed $actual, string $message = '')
Asserts that a variable is nan.
at line 1198
static
assertClassHasAttribute(string $attributeName, string $className, string $message = '')
Asserts that a class has a specified attribute.
at line 1226
static
assertClassNotHasAttribute(string $attributeName, string $className, string $message = '')
Asserts that a class does not have a specified attribute.
at line 1254
static
assertClassHasStaticAttribute(string $attributeName, string $className, string $message = '')
Asserts that a class has a specified static attribute.
at line 1282
static
assertClassNotHasStaticAttribute(string $attributeName, string $className, string $message = '')
Asserts that a class does not have a specified static attribute.
at line 1312
static
assertObjectHasAttribute(string $attributeName, object $object, string $message = '')
Asserts that an object has a specified attribute.
at line 1340
static
assertObjectNotHasAttribute(string $attributeName, object $object, string $message = '')
Asserts that an object does not have a specified attribute.
at line 1370
static
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.
at line 1392
static
assertAttributeSame(mixed $expected, string $actualAttributeName, string|object $actualClassOrObject, string $message = '')
Asserts that a variable and an attribute of an object have the same type and value.
at line 1410
static
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.
at line 1432
static
assertAttributeNotSame(mixed $expected, string $actualAttributeName, string|object $actualClassOrObject, string $message = '')
Asserts that a variable and an attribute of an object do not have the same type and value.
at line 1448
static
assertInstanceOf(string $expected, mixed $actual, string $message = '')
Asserts that a variable is of a given type.
at line 1469
static
assertAttributeInstanceOf(string $expected, string $attributeName, string|object $classOrObject, string $message = '')
Asserts that an attribute is of a given type.
at line 1485
static
assertNotInstanceOf(string $expected, mixed $actual, string $message = '')
Asserts that a variable is not of a given type.
at line 1506
static
assertAttributeNotInstanceOf(string $expected, string $attributeName, string|object $classOrObject, string $message = '')
Asserts that an attribute is of a given type.
at line 1522
static
assertInternalType(string $expected, mixed $actual, string $message = '')
Asserts that a variable is of a given type.
at line 1543
static
assertAttributeInternalType(string $expected, string $attributeName, string|object $classOrObject, string $message = '')
Asserts that an attribute is of a given type.
at line 1559
static
assertNotInternalType(string $expected, mixed $actual, string $message = '')
Asserts that a variable is not of a given type.
at line 1580
static
assertAttributeNotInternalType(string $expected, string $attributeName, string|object $classOrObject, string $message = '')
Asserts that an attribute is of a given type.
at line 1596
static
assertRegExp(string $pattern, string $string, string $message = '')
Asserts that a string matches a given regular expression.
at line 1618
static
assertNotRegExp(string $pattern, string $string, string $message = '')
Asserts that a string does not match a given regular expression.
at line 1643
static
assertSameSize(array|Countable|Traversable $expected, array|Countable|Traversable $actual, string $message = '')
Assert that the size of two arrays (or Countable
or Traversable
objects)
is the same.
at line 1672
static
assertNotSameSize(array|Countable|Traversable $expected, array|Countable|Traversable $actual, string $message = '')
Assert that the size of two arrays (or Countable
or Traversable
objects)
is not the same.
at line 1700
static
assertStringMatchesFormat(string $format, string $string, string $message = '')
Asserts that a string matches a given format string.
at line 1722
static
assertStringNotMatchesFormat(string $format, string $string, string $message = '')
Asserts that a string does not match a given format string.
at line 1746
static
assertStringMatchesFormatFile(string $formatFile, string $string, string $message = '')
Asserts that a string matches a given format file.
at line 1768
static
assertStringNotMatchesFormatFile(string $formatFile, string $string, string $message = '')
Asserts that a string does not match a given format string.
at line 1792
static
assertStringStartsWith(string $prefix, string $string, string $message = '')
Asserts that a string starts with a given prefix.
at line 1816
static
assertStringStartsNotWith(string $prefix, string $string, string $message = '')
Asserts that a string starts not with a given prefix.
at line 1840
static
assertStringEndsWith(string $suffix, string $string, string $message = '')
Asserts that a string ends with a given suffix.
at line 1862
static
assertStringEndsNotWith(string $suffix, string $string, string $message = '')
Asserts that a string ends not with a given suffix.
at line 1886
static
assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile, string $message = '')
Asserts that two XML files are equal.
at line 1901
static
assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile, string $message = '')
Asserts that two XML files are not equal.
at line 1916
static
assertXmlStringEqualsXmlFile(string $expectedFile, string $actualXml, string $message = '')
Asserts that two XML documents are equal.
at line 1931
static
assertXmlStringNotEqualsXmlFile(string $expectedFile, string $actualXml, string $message = '')
Asserts that two XML documents are not equal.
at line 1946
static
assertXmlStringEqualsXmlString(string $expectedXml, string $actualXml, string $message = '')
Asserts that two XML documents are equal.
at line 1961
static
assertXmlStringNotEqualsXmlString(string $expectedXml, string $actualXml, string $message = '')
Asserts that two XML documents are not equal.
at line 1977
static
assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, bool $checkAttributes = false, string $message = '')
Asserts that a hierarchy of DOMElements matches.
at line 2056
static
assertThat(mixed $value, PHPUnit_Framework_Constraint $constraint, string $message = '')
Evaluates a PHPUnit_Framework_Constraint matcher object.
at line 2069
static
assertJson(string $actualJson, string $message = '')
Asserts that a string is a valid JSON string.
at line 2085
static
assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson, string $message = '')
Asserts that two given JSON encoded objects or arrays are equal.
at line 2103
static
assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson, string $message = '')
Asserts that two given JSON encoded objects or arrays are not equal.
at line 2121
static
assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson, string $message = '')
Asserts that the generated JSON encoded object and the content of the given file are equal.
at line 2144
static
assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson, string $message = '')
Asserts that the generated JSON encoded object and the content of the given file are not equal.
at line 2167
static
assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile, string $message = '')
Asserts that two JSON files are equal.
at line 2196
static
assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile, string $message = '')
Asserts that two JSON files are not equal.
at line 2223
static PHPUnit_Framework_Constraint_And
logicalAnd()
Returns a PHPUnit_Framework_Constraint_And matcher object.
at line 2238
static PHPUnit_Framework_Constraint_Or
logicalOr()
Returns a PHPUnit_Framework_Constraint_Or matcher object.
at line 2255
static PHPUnit_Framework_Constraint_Not
logicalNot(PHPUnit_Framework_Constraint $constraint)
Returns a PHPUnit_Framework_Constraint_Not matcher object.
at line 2265
static PHPUnit_Framework_Constraint_Xor
logicalXor()
Returns a PHPUnit_Framework_Constraint_Xor matcher object.
at line 2280
static PHPUnit_Framework_Constraint_IsAnything
anything()
Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.
at line 2290
static PHPUnit_Framework_Constraint_IsTrue
isTrue()
Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
at line 2302
static PHPUnit_Framework_Constraint_Callback
callback(callable $callback)
Returns a PHPUnit_Framework_Constraint_Callback matcher object.
at line 2312
static PHPUnit_Framework_Constraint_IsFalse
isFalse()
Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.
at line 2322
static PHPUnit_Framework_Constraint_IsJson
isJson()
Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
at line 2332
static PHPUnit_Framework_Constraint_IsNull
isNull()
Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
at line 2342
static PHPUnit_Framework_Constraint_IsFinite
isFinite()
Returns a PHPUnit_Framework_Constraint_IsFinite matcher object.
at line 2352
static PHPUnit_Framework_Constraint_IsInfinite
isInfinite()
Returns a PHPUnit_Framework_Constraint_IsInfinite matcher object.
at line 2362
static PHPUnit_Framework_Constraint_IsNan
isNan()
Returns a PHPUnit_Framework_Constraint_IsNan matcher object.
at line 2375
static PHPUnit_Framework_Constraint_Attribute
attribute(PHPUnit_Framework_Constraint $constraint, string $attributeName)
Returns a PHPUnit_Framework_Constraint_Attribute matcher object.
at line 2393
static PHPUnit_Framework_Constraint_TraversableContains
contains(mixed $value, bool $checkForObjectIdentity = true, bool $checkForNonObjectIdentity = false)
Returns a PHPUnit_Framework_Constraint_TraversableContains matcher object.
at line 2406
static PHPUnit_Framework_Constraint_TraversableContainsOnly
containsOnly(string $type)
Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.
at line 2419
static PHPUnit_Framework_Constraint_TraversableContainsOnly
containsOnlyInstancesOf(string $classname)
Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.
at line 2431
static PHPUnit_Framework_Constraint_ArrayHasKey
arrayHasKey(mixed $key)
Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.
at line 2447
static PHPUnit_Framework_Constraint_IsEqual
equalTo(mixed $value, float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false)
Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.
at line 2472
static PHPUnit_Framework_Constraint_Attribute
attributeEqualTo(string $attributeName, mixed $value, float $delta = 0.0, int $maxDepth = 10, bool $canonicalize = false, bool $ignoreCase = false)
Returns a PHPUnit_Framework_Constraint_IsEqual matcher object that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher object.
at line 2491
static PHPUnit_Framework_Constraint_IsEmpty
isEmpty()
Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.
at line 2501
static PHPUnit_Framework_Constraint_IsWritable
isWritable()
Returns a PHPUnit_Framework_Constraint_IsWritable matcher object.
at line 2511
static PHPUnit_Framework_Constraint_IsReadable
isReadable()
Returns a PHPUnit_Framework_Constraint_IsReadable matcher object.
at line 2521
static PHPUnit_Framework_Constraint_DirectoryExists
directoryExists()
Returns a PHPUnit_Framework_Constraint_DirectoryExists matcher object.
at line 2531
static PHPUnit_Framework_Constraint_FileExists
fileExists()
Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
at line 2543
static PHPUnit_Framework_Constraint_GreaterThan
greaterThan(mixed $value)
Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.
at line 2557
static PHPUnit_Framework_Constraint_Or
greaterThanOrEqual(mixed $value)
Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_GreaterThan matcher object.
at line 2572
static PHPUnit_Framework_Constraint_ClassHasAttribute
classHasAttribute(string $attributeName)
Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.
at line 2587
static PHPUnit_Framework_Constraint_ClassHasStaticAttribute
classHasStaticAttribute(string $attributeName)
Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher object.
at line 2601
static PHPUnit_Framework_Constraint_ObjectHasAttribute
objectHasAttribute(string $attributeName)
Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.
at line 2615
static PHPUnit_Framework_Constraint_IsIdentical
identicalTo(mixed $value)
Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.
at line 2627
static PHPUnit_Framework_Constraint_IsInstanceOf
isInstanceOf(string $className)
Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.
at line 2639
static PHPUnit_Framework_Constraint_IsType
isType(string $type)
Returns a PHPUnit_Framework_Constraint_IsType matcher object.
at line 2651
static PHPUnit_Framework_Constraint_LessThan
lessThan(mixed $value)
Returns a PHPUnit_Framework_Constraint_LessThan matcher object.
at line 2665
static PHPUnit_Framework_Constraint_Or
lessThanOrEqual(mixed $value)
Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_LessThan matcher object.
at line 2680
static PHPUnit_Framework_Constraint_PCREMatch
matchesRegularExpression(string $pattern)
Returns a PHPUnit_Framework_Constraint_PCREMatch matcher object.
at line 2692
static PHPUnit_Framework_Constraint_StringMatches
matches(string $string)
Returns a PHPUnit_Framework_Constraint_StringMatches matcher object.
at line 2704
static PHPUnit_Framework_Constraint_StringStartsWith
stringStartsWith(mixed $prefix)
Returns a PHPUnit_Framework_Constraint_StringStartsWith matcher object.
at line 2717
static PHPUnit_Framework_Constraint_StringContains
stringContains(string $string, bool $case = true)
Returns a PHPUnit_Framework_Constraint_StringContains matcher object.
at line 2729
static PHPUnit_Framework_Constraint_StringEndsWith
stringEndsWith(mixed $suffix)
Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.
at line 2741
static PHPUnit_Framework_Constraint_Count
countOf(int $count)
Returns a PHPUnit_Framework_Constraint_Count matcher object.
at line 2752
static
fail(string $message = '')
Fails a test with the given message.
at line 2768
static mixed
readAttribute(string|object $classOrObject, string $attributeName)
Returns the value of an attribute of a class or an object.
This also works for attributes that are declared protected or private.
at line 2814
static mixed
getStaticAttribute(string $className, string $attributeName)
Returns the value of a static attribute.
This also works for attributes that are declared protected or private.
at line 2863
static mixed
getObjectAttribute(object $object, string $attributeName)
Returns the value of an object's attribute.
This also works for attributes that are declared protected or private.
at line 2918
static
markTestIncomplete(string $message = '')
Mark the test as incomplete.
at line 2930
static
markTestSkipped(string $message = '')
Mark the test as skipped.
at line 2940
static int
getCount()
Return the current assertion count.
at line 2948
static
resetCount()
Reset the assertion counter.