Functions.php
Table of Contents
- any() : PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount
- Returns a matcher that matches when the method is executed zero or more times.
- anything() : PHPUnit_Framework_Constraint_IsAnything
- Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.
- arrayHasKey() : PHPUnit_Framework_Constraint_ArrayHasKey
- Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.
- assertArrayHasKey() : mixed
- Asserts that an array has a specified key.
- assertArraySubset() : mixed
- Asserts that an array has a specified subset.
- assertArrayNotHasKey() : mixed
- Asserts that an array does not have a specified key.
- assertAttributeContains() : mixed
- Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object contains a needle.
- assertAttributeContainsOnly() : mixed
- 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.
- assertAttributeCount() : mixed
- Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
- assertAttributeEmpty() : mixed
- Asserts that a static attribute of a class or an attribute of an object is empty.
- assertAttributeEquals() : mixed
- Asserts that a variable is equal to an attribute of an object.
- assertAttributeGreaterThan() : mixed
- Asserts that an attribute is greater than another value.
- assertAttributeGreaterThanOrEqual() : mixed
- Asserts that an attribute is greater than or equal to another value.
- assertAttributeInstanceOf() : mixed
- Asserts that an attribute is of a given type.
- assertAttributeInternalType() : mixed
- Asserts that an attribute is of a given type.
- assertAttributeLessThan() : mixed
- Asserts that an attribute is smaller than another value.
- assertAttributeLessThanOrEqual() : mixed
- Asserts that an attribute is smaller than or equal to another value.
- assertAttributeNotContains() : mixed
- 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.
- assertAttributeNotContainsOnly() : mixed
- 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.
- assertAttributeNotCount() : mixed
- Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
- assertAttributeNotEmpty() : mixed
- Asserts that a static attribute of a class or an attribute of an object is not empty.
- assertAttributeNotEquals() : mixed
- Asserts that a variable is not equal to an attribute of an object.
- assertAttributeNotInstanceOf() : mixed
- Asserts that an attribute is of a given type.
- assertAttributeNotInternalType() : mixed
- Asserts that an attribute is of a given type.
- assertAttributeNotSame() : mixed
- Asserts that a variable and an attribute of an object do not have the same type and value.
- assertAttributeSame() : mixed
- Asserts that a variable and an attribute of an object have the same type and value.
- assertClassHasAttribute() : mixed
- Asserts that a class has a specified attribute.
- assertClassHasStaticAttribute() : mixed
- Asserts that a class has a specified static attribute.
- assertClassNotHasAttribute() : mixed
- Asserts that a class does not have a specified attribute.
- assertClassNotHasStaticAttribute() : mixed
- Asserts that a class does not have a specified static attribute.
- assertContains() : mixed
- Asserts that a haystack contains a needle.
- assertContainsOnly() : mixed
- Asserts that a haystack contains only values of a given type.
- assertContainsOnlyInstancesOf() : mixed
- Asserts that a haystack contains only instances of a given classname
- assertCount() : mixed
- Asserts the number of elements of an array, Countable or Traversable.
- assertEmpty() : mixed
- Asserts that a variable is empty.
- assertEqualXMLStructure() : mixed
- Asserts that a hierarchy of DOMElements matches.
- assertEquals() : mixed
- Asserts that two variables are equal.
- assertNotTrue() : mixed
- Asserts that a condition is not true.
- assertFalse() : mixed
- Asserts that a condition is false.
- assertFileEquals() : mixed
- Asserts that the contents of one file is equal to the contents of another file.
- assertFileExists() : mixed
- Asserts that a file exists.
- assertFileNotEquals() : mixed
- Asserts that the contents of one file is not equal to the contents of another file.
- assertFileNotExists() : mixed
- Asserts that a file does not exist.
- assertGreaterThan() : mixed
- Asserts that a value is greater than another value.
- assertGreaterThanOrEqual() : mixed
- Asserts that a value is greater than or equal to another value.
- assertInstanceOf() : mixed
- Asserts that a variable is of a given type.
- assertInternalType() : mixed
- Asserts that a variable is of a given type.
- assertJson() : mixed
- Asserts that a string is a valid JSON string.
- assertJsonFileEqualsJsonFile() : mixed
- Asserts that two JSON files are equal.
- assertJsonFileNotEqualsJsonFile() : mixed
- Asserts that two JSON files are not equal.
- assertJsonStringEqualsJsonFile() : mixed
- Asserts that the generated JSON encoded object and the content of the given file are equal.
- assertJsonStringEqualsJsonString() : mixed
- Asserts that two given JSON encoded objects or arrays are equal.
- assertJsonStringNotEqualsJsonFile() : mixed
- Asserts that the generated JSON encoded object and the content of the given file are not equal.
- assertJsonStringNotEqualsJsonString() : mixed
- Asserts that two given JSON encoded objects or arrays are not equal.
- assertLessThan() : mixed
- Asserts that a value is smaller than another value.
- assertLessThanOrEqual() : mixed
- Asserts that a value is smaller than or equal to another value.
- assertNotContains() : mixed
- Asserts that a haystack does not contain a needle.
- assertNotContainsOnly() : mixed
- Asserts that a haystack does not contain only values of a given type.
- assertNotCount() : mixed
- Asserts the number of elements of an array, Countable or Traversable.
- assertNotEmpty() : mixed
- Asserts that a variable is not empty.
- assertNotEquals() : mixed
- Asserts that two variables are not equal.
- assertNotInstanceOf() : mixed
- Asserts that a variable is not of a given type.
- assertNotInternalType() : mixed
- Asserts that a variable is not of a given type.
- assertNotFalse() : mixed
- Asserts that a condition is not false.
- assertNotNull() : mixed
- Asserts that a variable is not null.
- assertNotRegExp() : mixed
- Asserts that a string does not match a given regular expression.
- assertNotSame() : mixed
- Asserts that two variables do not have the same type and value.
- assertNotSameSize() : mixed
- Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same.
- assertNotTag() : mixed
- This assertion is the exact opposite of assertTag().
- assertNull() : mixed
- Asserts that a variable is null.
- assertObjectHasAttribute() : mixed
- Asserts that an object has a specified attribute.
- assertObjectNotHasAttribute() : mixed
- Asserts that an object does not have a specified attribute.
- assertRegExp() : mixed
- Asserts that a string matches a given regular expression.
- assertSame() : mixed
- Asserts that two variables have the same type and value.
- assertSameSize() : mixed
- Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same.
- assertSelectCount() : mixed
- Assert the presence, absence, or count of elements in a document matching the CSS $selector, regardless of the contents of those elements.
- assertSelectEquals() : mixed
- assertSelectEquals("#binder .name", "Chuck", true, $xml); // any? assertSelectEquals("#binder .name", "Chuck", false, $xml); // none?
- assertSelectRegExp() : mixed
- assertSelectRegExp("#binder .name", "/Mike|Derek/", true, $xml); // any? assertSelectRegExp("#binder .name", "/Mike|Derek/", 3, $xml);// 3?
- assertStringEndsNotWith() : mixed
- Asserts that a string ends not with a given prefix.
- assertStringEndsWith() : mixed
- Asserts that a string ends with a given prefix.
- assertStringEqualsFile() : mixed
- Asserts that the contents of a string is equal to the contents of a file.
- assertStringMatchesFormat() : mixed
- Asserts that a string matches a given format string.
- assertStringMatchesFormatFile() : mixed
- Asserts that a string matches a given format file.
- assertStringNotEqualsFile() : mixed
- Asserts that the contents of a string is not equal to the contents of a file.
- assertStringNotMatchesFormat() : mixed
- Asserts that a string does not match a given format string.
- assertStringNotMatchesFormatFile() : mixed
- Asserts that a string does not match a given format string.
- assertStringStartsNotWith() : mixed
- Asserts that a string starts not with a given prefix.
- assertStringStartsWith() : mixed
- Asserts that a string starts with a given prefix.
- assertTag() : mixed
- Evaluate an HTML or XML string and assert its structure and/or contents.
- assertThat() : mixed
- Evaluates a PHPUnit_Framework_Constraint matcher object.
- assertTrue() : mixed
- Asserts that a condition is true.
- assertXmlFileEqualsXmlFile() : mixed
- Asserts that two XML files are equal.
- assertXmlFileNotEqualsXmlFile() : mixed
- Asserts that two XML files are not equal.
- assertXmlStringEqualsXmlFile() : mixed
- Asserts that two XML documents are equal.
- assertXmlStringEqualsXmlString() : mixed
- Asserts that two XML documents are equal.
- assertXmlStringNotEqualsXmlFile() : mixed
- Asserts that two XML documents are not equal.
- assertXmlStringNotEqualsXmlString() : mixed
- Asserts that two XML documents are not equal.
- at() : PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex
- Returns a matcher that matches when the method is executed at the given $index.
- atLeastOnce() : PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce
- Returns a matcher that matches when the method is executed at least once.
- attribute() : PHPUnit_Framework_Constraint_Attribute
- Returns a PHPUnit_Framework_Constraint_Attribute matcher object.
- attributeEqualTo() : PHPUnit_Framework_Constraint_Attribute
- Returns a PHPUnit_Framework_Constraint_IsEqual matcher object that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher object.
- callback() : PHPUnit_Framework_Constraint_Callback
- Returns a PHPUnit_Framework_Constraint_Callback matcher object.
- classHasAttribute() : PHPUnit_Framework_Constraint_ClassHasAttribute
- Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.
- classHasStaticAttribute() : PHPUnit_Framework_Constraint_ClassHasStaticAttribute
- Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher object.
- contains() : PHPUnit_Framework_Constraint_TraversableContains
- Returns a PHPUnit_Framework_Constraint_TraversableContains matcher object.
- containsOnly() : PHPUnit_Framework_Constraint_TraversableContainsOnly
- Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.
- containsOnlyInstancesOf() : PHPUnit_Framework_Constraint_TraversableContainsOnly
- Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.
- equalTo() : PHPUnit_Framework_Constraint_IsEqual
- Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.
- exactly() : PHPUnit_Framework_MockObject_Matcher_InvokedCount
- Returns a matcher that matches when the method is executed exactly $count times.
- fileExists() : PHPUnit_Framework_Constraint_FileExists
- Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
- greaterThan() : PHPUnit_Framework_Constraint_GreaterThan
- Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.
- greaterThanOrEqual() : PHPUnit_Framework_Constraint_Or
- Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_GreaterThan matcher object.
- identicalTo() : PHPUnit_Framework_Constraint_IsIdentical
- Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.
- isEmpty() : PHPUnit_Framework_Constraint_IsEmpty
- Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.
- isFalse() : PHPUnit_Framework_Constraint_IsFalse
- Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.
- isInstanceOf() : PHPUnit_Framework_Constraint_IsInstanceOf
- Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.
- isJson() : PHPUnit_Framework_Constraint_IsJson
- Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
- isNull() : PHPUnit_Framework_Constraint_IsNull
- Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
- isTrue() : PHPUnit_Framework_Constraint_IsTrue
- Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
- isType() : PHPUnit_Framework_Constraint_IsType
- Returns a PHPUnit_Framework_Constraint_IsType matcher object.
- lessThan() : PHPUnit_Framework_Constraint_LessThan
- Returns a PHPUnit_Framework_Constraint_LessThan matcher object.
- lessThanOrEqual() : PHPUnit_Framework_Constraint_Or
- Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_LessThan matcher object.
- logicalAnd() : PHPUnit_Framework_Constraint_And
- Returns a PHPUnit_Framework_Constraint_And matcher object.
- logicalNot() : PHPUnit_Framework_Constraint_Not
- Returns a PHPUnit_Framework_Constraint_Not matcher object.
- logicalOr() : PHPUnit_Framework_Constraint_Or
- Returns a PHPUnit_Framework_Constraint_Or matcher object.
- logicalXor() : PHPUnit_Framework_Constraint_Xor
- Returns a PHPUnit_Framework_Constraint_Xor matcher object.
- matches() : PHPUnit_Framework_Constraint_StringMatches
- Returns a PHPUnit_Framework_Constraint_StringMatches matcher object.
- matchesRegularExpression() : PHPUnit_Framework_Constraint_PCREMatch
- Returns a PHPUnit_Framework_Constraint_PCREMatch matcher object.
- never() : PHPUnit_Framework_MockObject_Matcher_InvokedCount
- Returns a matcher that matches when the method is never executed.
- objectHasAttribute() : PHPUnit_Framework_Constraint_ObjectHasAttribute
- Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.
- onConsecutiveCalls() : PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls
- once() : PHPUnit_Framework_MockObject_Matcher_InvokedCount
- Returns a matcher that matches when the method is executed exactly once.
- returnArgument() : PHPUnit_Framework_MockObject_Stub_ReturnArgument
- returnCallback() : PHPUnit_Framework_MockObject_Stub_ReturnCallback
- returnSelf() : PHPUnit_Framework_MockObject_Stub_ReturnSelf
- Returns the current object.
- returnValue() : PHPUnit_Framework_MockObject_Stub_Return
- returnValueMap() : PHPUnit_Framework_MockObject_Stub_ReturnValueMap
- stringContains() : PHPUnit_Framework_Constraint_StringContains
- Returns a PHPUnit_Framework_Constraint_StringContains matcher object.
- stringEndsWith() : PHPUnit_Framework_Constraint_StringEndsWith
- Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.
- stringStartsWith() : PHPUnit_Framework_Constraint_StringStartsWith
- Returns a PHPUnit_Framework_Constraint_StringStartsWith matcher object.
- throwException() : PHPUnit_Framework_MockObject_Stub_Exception
Functions
any()
Returns a matcher that matches when the method is executed zero or more times.
any() : PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount
Tags
anything()
Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.
anything() : PHPUnit_Framework_Constraint_IsAnything
Tags
arrayHasKey()
Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.
arrayHasKey(mixed $key) : PHPUnit_Framework_Constraint_ArrayHasKey
Parameters
- $key : mixed
Tags
assertArrayHasKey()
Asserts that an array has a specified key.
assertArrayHasKey(mixed $key, array<string|int, mixed>|ArrayAccess $array[, string $message = '' ]) : mixed
Parameters
- $key : mixed
- $array : array<string|int, mixed>|ArrayAccess
- $message : string = ''
Tags
assertArraySubset()
Asserts that an array has a specified subset.
assertArraySubset(array<string|int, mixed>|ArrayAccess $subset, array<string|int, mixed>|ArrayAccess $array[, bool $strict = false ][, string $message = '' ]) : mixed
Parameters
- $subset : array<string|int, mixed>|ArrayAccess
- $array : array<string|int, mixed>|ArrayAccess
- $strict : bool = false
-
Check for object identity
- $message : string = ''
Tags
assertArrayNotHasKey()
Asserts that an array does not have a specified key.
assertArrayNotHasKey(mixed $key, array<string|int, mixed>|ArrayAccess $array[, string $message = '' ]) : mixed
Parameters
- $key : mixed
- $array : array<string|int, mixed>|ArrayAccess
- $message : string = ''
Tags
assertAttributeContains()
Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object contains a needle.
assertAttributeContains(mixed $needle, string $haystackAttributeName, mixed $haystackClassOrObject[, string $message = '' ][, bool $ignoreCase = false ][, bool $checkForObjectIdentity = true ][, bool $checkForNonObjectIdentity = false ]) : mixed
Parameters
- $needle : mixed
- $haystackAttributeName : string
- $haystackClassOrObject : mixed
- $message : string = ''
- $ignoreCase : bool = false
- $checkForObjectIdentity : bool = true
- $checkForNonObjectIdentity : bool = false
Tags
assertAttributeContainsOnly()
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.
assertAttributeContainsOnly(string $type, string $haystackAttributeName, mixed $haystackClassOrObject[, bool $isNativeType = null ][, string $message = '' ]) : mixed
Parameters
- $type : string
- $haystackAttributeName : string
- $haystackClassOrObject : mixed
- $isNativeType : bool = null
- $message : string = ''
Tags
assertAttributeCount()
Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
assertAttributeCount(int $expectedCount, string $haystackAttributeName, mixed $haystackClassOrObject[, string $message = '' ]) : mixed
Parameters
- $expectedCount : int
- $haystackAttributeName : string
- $haystackClassOrObject : mixed
- $message : string = ''
Tags
assertAttributeEmpty()
Asserts that a static attribute of a class or an attribute of an object is empty.
assertAttributeEmpty(string $haystackAttributeName, mixed $haystackClassOrObject[, string $message = '' ]) : mixed
Parameters
- $haystackAttributeName : string
- $haystackClassOrObject : mixed
- $message : string = ''
Tags
assertAttributeEquals()
Asserts that a variable is equal to an attribute of an object.
assertAttributeEquals(mixed $expected, string $actualAttributeName, string $actualClassOrObject[, string $message = '' ][, float $delta = 0.0 ][, int $maxDepth = 10 ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : mixed
Parameters
- $expected : mixed
- $actualAttributeName : string
- $actualClassOrObject : string
- $message : string = ''
- $delta : float = 0.0
- $maxDepth : int = 10
- $canonicalize : bool = false
- $ignoreCase : bool = false
assertAttributeGreaterThan()
Asserts that an attribute is greater than another value.
assertAttributeGreaterThan(mixed $expected, string $actualAttributeName, string $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
- $expected : mixed
- $actualAttributeName : string
- $actualClassOrObject : string
- $message : string = ''
Tags
assertAttributeGreaterThanOrEqual()
Asserts that an attribute is greater than or equal to another value.
assertAttributeGreaterThanOrEqual(mixed $expected, string $actualAttributeName, string $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
- $expected : mixed
- $actualAttributeName : string
- $actualClassOrObject : string
- $message : string = ''
Tags
assertAttributeInstanceOf()
Asserts that an attribute is of a given type.
assertAttributeInstanceOf(string $expected, string $attributeName, mixed $classOrObject[, string $message = '' ]) : mixed
Parameters
- $expected : string
- $attributeName : string
- $classOrObject : mixed
- $message : string = ''
Tags
assertAttributeInternalType()
Asserts that an attribute is of a given type.
assertAttributeInternalType(string $expected, string $attributeName, mixed $classOrObject[, string $message = '' ]) : mixed
Parameters
- $expected : string
- $attributeName : string
- $classOrObject : mixed
- $message : string = ''
Tags
assertAttributeLessThan()
Asserts that an attribute is smaller than another value.
assertAttributeLessThan(mixed $expected, string $actualAttributeName, string $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
- $expected : mixed
- $actualAttributeName : string
- $actualClassOrObject : string
- $message : string = ''
Tags
assertAttributeLessThanOrEqual()
Asserts that an attribute is smaller than or equal to another value.
assertAttributeLessThanOrEqual(mixed $expected, string $actualAttributeName, string $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
- $expected : mixed
- $actualAttributeName : string
- $actualClassOrObject : string
- $message : string = ''
Tags
assertAttributeNotContains()
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.
assertAttributeNotContains(mixed $needle, string $haystackAttributeName, mixed $haystackClassOrObject[, string $message = '' ][, bool $ignoreCase = false ][, bool $checkForObjectIdentity = true ][, bool $checkForNonObjectIdentity = false ]) : mixed
Parameters
- $needle : mixed
- $haystackAttributeName : string
- $haystackClassOrObject : mixed
- $message : string = ''
- $ignoreCase : bool = false
- $checkForObjectIdentity : bool = true
- $checkForNonObjectIdentity : bool = false
Tags
assertAttributeNotContainsOnly()
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.
assertAttributeNotContainsOnly(string $type, string $haystackAttributeName, mixed $haystackClassOrObject[, bool $isNativeType = null ][, string $message = '' ]) : mixed
Parameters
- $type : string
- $haystackAttributeName : string
- $haystackClassOrObject : mixed
- $isNativeType : bool = null
- $message : string = ''
Tags
assertAttributeNotCount()
Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.
assertAttributeNotCount(int $expectedCount, string $haystackAttributeName, mixed $haystackClassOrObject[, string $message = '' ]) : mixed
Parameters
- $expectedCount : int
- $haystackAttributeName : string
- $haystackClassOrObject : mixed
- $message : string = ''
Tags
assertAttributeNotEmpty()
Asserts that a static attribute of a class or an attribute of an object is not empty.
assertAttributeNotEmpty(string $haystackAttributeName, mixed $haystackClassOrObject[, string $message = '' ]) : mixed
Parameters
- $haystackAttributeName : string
- $haystackClassOrObject : mixed
- $message : string = ''
Tags
assertAttributeNotEquals()
Asserts that a variable is not equal to an attribute of an object.
assertAttributeNotEquals(mixed $expected, string $actualAttributeName, string $actualClassOrObject[, string $message = '' ][, float $delta = 0.0 ][, int $maxDepth = 10 ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : mixed
Parameters
- $expected : mixed
- $actualAttributeName : string
- $actualClassOrObject : string
- $message : string = ''
- $delta : float = 0.0
- $maxDepth : int = 10
- $canonicalize : bool = false
- $ignoreCase : bool = false
assertAttributeNotInstanceOf()
Asserts that an attribute is of a given type.
assertAttributeNotInstanceOf(string $expected, string $attributeName, mixed $classOrObject[, string $message = '' ]) : mixed
Parameters
- $expected : string
- $attributeName : string
- $classOrObject : mixed
- $message : string = ''
Tags
assertAttributeNotInternalType()
Asserts that an attribute is of a given type.
assertAttributeNotInternalType(string $expected, string $attributeName, mixed $classOrObject[, string $message = '' ]) : mixed
Parameters
- $expected : string
- $attributeName : string
- $classOrObject : mixed
- $message : string = ''
Tags
assertAttributeNotSame()
Asserts that a variable and an attribute of an object do not have the same type and value.
assertAttributeNotSame(mixed $expected, string $actualAttributeName, object $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
- $expected : mixed
- $actualAttributeName : string
- $actualClassOrObject : object
- $message : string = ''
assertAttributeSame()
Asserts that a variable and an attribute of an object have the same type and value.
assertAttributeSame(mixed $expected, string $actualAttributeName, object $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
- $expected : mixed
- $actualAttributeName : string
- $actualClassOrObject : object
- $message : string = ''
assertClassHasAttribute()
Asserts that a class has a specified attribute.
assertClassHasAttribute(string $attributeName, string $className[, string $message = '' ]) : mixed
Parameters
- $attributeName : string
- $className : string
- $message : string = ''
Tags
assertClassHasStaticAttribute()
Asserts that a class has a specified static attribute.
assertClassHasStaticAttribute(string $attributeName, string $className[, string $message = '' ]) : mixed
Parameters
- $attributeName : string
- $className : string
- $message : string = ''
Tags
assertClassNotHasAttribute()
Asserts that a class does not have a specified attribute.
assertClassNotHasAttribute(string $attributeName, string $className[, string $message = '' ]) : mixed
Parameters
- $attributeName : string
- $className : string
- $message : string = ''
Tags
assertClassNotHasStaticAttribute()
Asserts that a class does not have a specified static attribute.
assertClassNotHasStaticAttribute(string $attributeName, string $className[, string $message = '' ]) : mixed
Parameters
- $attributeName : string
- $className : string
- $message : string = ''
Tags
assertContains()
Asserts that a haystack contains a needle.
assertContains(mixed $needle, mixed $haystack[, string $message = '' ][, bool $ignoreCase = false ][, bool $checkForObjectIdentity = true ][, bool $checkForNonObjectIdentity = false ]) : mixed
Parameters
- $needle : mixed
- $haystack : mixed
- $message : string = ''
- $ignoreCase : bool = false
- $checkForObjectIdentity : bool = true
- $checkForNonObjectIdentity : bool = false
Tags
assertContainsOnly()
Asserts that a haystack contains only values of a given type.
assertContainsOnly(string $type, mixed $haystack[, bool $isNativeType = null ][, string $message = '' ]) : mixed
Parameters
- $type : string
- $haystack : mixed
- $isNativeType : bool = null
- $message : string = ''
Tags
assertContainsOnlyInstancesOf()
Asserts that a haystack contains only instances of a given classname
assertContainsOnlyInstancesOf(string $classname, array<string|int, mixed>|Traversable $haystack[, string $message = '' ]) : mixed
Parameters
- $classname : string
- $haystack : array<string|int, mixed>|Traversable
- $message : string = ''
assertCount()
Asserts the number of elements of an array, Countable or Traversable.
assertCount(int $expectedCount, mixed $haystack[, string $message = '' ]) : mixed
Parameters
- $expectedCount : int
- $haystack : mixed
- $message : string = ''
assertEmpty()
Asserts that a variable is empty.
assertEmpty(mixed $actual[, string $message = '' ]) : mixed
Parameters
- $actual : mixed
- $message : string = ''
Tags
assertEqualXMLStructure()
Asserts that a hierarchy of DOMElements matches.
assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement[, bool $checkAttributes = false ][, string $message = '' ]) : mixed
Parameters
- $expectedElement : DOMElement
- $actualElement : DOMElement
- $checkAttributes : bool = false
- $message : string = ''
Tags
assertEquals()
Asserts that two variables are equal.
assertEquals(mixed $expected, mixed $actual[, string $message = '' ][, float $delta = 0.0 ][, int $maxDepth = 10 ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : mixed
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
- $delta : float = 0.0
- $maxDepth : int = 10
- $canonicalize : bool = false
- $ignoreCase : bool = false
assertNotTrue()
Asserts that a condition is not true.
assertNotTrue(bool $condition[, string $message = '' ]) : mixed
Parameters
- $condition : bool
- $message : string = ''
Tags
assertFalse()
Asserts that a condition is false.
assertFalse(bool $condition[, string $message = '' ]) : mixed
Parameters
- $condition : bool
- $message : string = ''
Tags
assertFileEquals()
Asserts that the contents of one file is equal to the contents of another file.
assertFileEquals(string $expected, string $actual[, string $message = '' ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : mixed
Parameters
- $expected : string
- $actual : string
- $message : string = ''
- $canonicalize : bool = false
- $ignoreCase : bool = false
Tags
assertFileExists()
Asserts that a file exists.
assertFileExists(string $filename[, string $message = '' ]) : mixed
Parameters
- $filename : string
- $message : string = ''
Tags
assertFileNotEquals()
Asserts that the contents of one file is not equal to the contents of another file.
assertFileNotEquals(string $expected, string $actual[, string $message = '' ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : mixed
Parameters
- $expected : string
- $actual : string
- $message : string = ''
- $canonicalize : bool = false
- $ignoreCase : bool = false
Tags
assertFileNotExists()
Asserts that a file does not exist.
assertFileNotExists(string $filename[, string $message = '' ]) : mixed
Parameters
- $filename : string
- $message : string = ''
Tags
assertGreaterThan()
Asserts that a value is greater than another value.
assertGreaterThan(mixed $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
Tags
assertGreaterThanOrEqual()
Asserts that a value is greater than or equal to another value.
assertGreaterThanOrEqual(mixed $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
Tags
assertInstanceOf()
Asserts that a variable is of a given type.
assertInstanceOf(string $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
- $expected : string
- $actual : mixed
- $message : string = ''
Tags
assertInternalType()
Asserts that a variable is of a given type.
assertInternalType(string $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
- $expected : string
- $actual : mixed
- $message : string = ''
Tags
assertJson()
Asserts that a string is a valid JSON string.
assertJson(string $actualJson[, string $message = '' ]) : mixed
Parameters
- $actualJson : string
- $message : string = ''
Tags
assertJsonFileEqualsJsonFile()
Asserts that two JSON files are equal.
assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile[, string $message = '' ]) : mixed
Parameters
- $expectedFile : string
- $actualFile : string
- $message : string = ''
assertJsonFileNotEqualsJsonFile()
Asserts that two JSON files are not equal.
assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile[, string $message = '' ]) : mixed
Parameters
- $expectedFile : string
- $actualFile : string
- $message : string = ''
assertJsonStringEqualsJsonFile()
Asserts that the generated JSON encoded object and the content of the given file are equal.
assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson[, string $message = '' ]) : mixed
Parameters
- $expectedFile : string
- $actualJson : string
- $message : string = ''
assertJsonStringEqualsJsonString()
Asserts that two given JSON encoded objects or arrays are equal.
assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson[, string $message = '' ]) : mixed
Parameters
- $expectedJson : string
- $actualJson : string
- $message : string = ''
assertJsonStringNotEqualsJsonFile()
Asserts that the generated JSON encoded object and the content of the given file are not equal.
assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson[, string $message = '' ]) : mixed
Parameters
- $expectedFile : string
- $actualJson : string
- $message : string = ''
assertJsonStringNotEqualsJsonString()
Asserts that two given JSON encoded objects or arrays are not equal.
assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson[, string $message = '' ]) : mixed
Parameters
- $expectedJson : string
- $actualJson : string
- $message : string = ''
assertLessThan()
Asserts that a value is smaller than another value.
assertLessThan(mixed $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
Tags
assertLessThanOrEqual()
Asserts that a value is smaller than or equal to another value.
assertLessThanOrEqual(mixed $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
Tags
assertNotContains()
Asserts that a haystack does not contain a needle.
assertNotContains(mixed $needle, mixed $haystack[, string $message = '' ][, bool $ignoreCase = false ][, bool $checkForObjectIdentity = true ][, bool $checkForNonObjectIdentity = false ]) : mixed
Parameters
- $needle : mixed
- $haystack : mixed
- $message : string = ''
- $ignoreCase : bool = false
- $checkForObjectIdentity : bool = true
- $checkForNonObjectIdentity : bool = false
Tags
assertNotContainsOnly()
Asserts that a haystack does not contain only values of a given type.
assertNotContainsOnly(string $type, mixed $haystack[, bool $isNativeType = null ][, string $message = '' ]) : mixed
Parameters
- $type : string
- $haystack : mixed
- $isNativeType : bool = null
- $message : string = ''
Tags
assertNotCount()
Asserts the number of elements of an array, Countable or Traversable.
assertNotCount(int $expectedCount, mixed $haystack[, string $message = '' ]) : mixed
Parameters
- $expectedCount : int
- $haystack : mixed
- $message : string = ''
assertNotEmpty()
Asserts that a variable is not empty.
assertNotEmpty(mixed $actual[, string $message = '' ]) : mixed
Parameters
- $actual : mixed
- $message : string = ''
Tags
assertNotEquals()
Asserts that two variables are not equal.
assertNotEquals(mixed $expected, mixed $actual[, string $message = '' ][, float $delta = 0.0 ][, int $maxDepth = 10 ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : mixed
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
- $delta : float = 0.0
- $maxDepth : int = 10
- $canonicalize : bool = false
- $ignoreCase : bool = false
Tags
assertNotInstanceOf()
Asserts that a variable is not of a given type.
assertNotInstanceOf(string $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
- $expected : string
- $actual : mixed
- $message : string = ''
Tags
assertNotInternalType()
Asserts that a variable is not of a given type.
assertNotInternalType(string $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
- $expected : string
- $actual : mixed
- $message : string = ''
Tags
assertNotFalse()
Asserts that a condition is not false.
assertNotFalse(bool $condition[, string $message = '' ]) : mixed
Parameters
- $condition : bool
- $message : string = ''
Tags
assertNotNull()
Asserts that a variable is not null.
assertNotNull(mixed $actual[, string $message = '' ]) : mixed
Parameters
- $actual : mixed
- $message : string = ''
assertNotRegExp()
Asserts that a string does not match a given regular expression.
assertNotRegExp(string $pattern, string $string[, string $message = '' ]) : mixed
Parameters
- $pattern : string
- $string : string
- $message : string = ''
Tags
assertNotSame()
Asserts that two variables do not have the same type and value.
assertNotSame(mixed $expected, mixed $actual[, string $message = '' ]) : mixed
Used on objects, it asserts that two variables do not reference the same object.
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
assertNotSameSize()
Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same.
assertNotSameSize(array<string|int, mixed>|Countable|Traversable $expected, array<string|int, mixed>|Countable|Traversable $actual[, string $message = '' ]) : mixed
Parameters
- $expected : array<string|int, mixed>|Countable|Traversable
- $actual : array<string|int, mixed>|Countable|Traversable
- $message : string = ''
assertNotTag()
This assertion is the exact opposite of assertTag().
assertNotTag(array<string|int, mixed> $matcher, string $actual[, string $message = '' ][, bool $isHtml = true ]) : mixed
Rather than asserting that $matcher results in a match, it asserts that $matcher does not match.
Parameters
- $matcher : array<string|int, mixed>
- $actual : string
- $message : string = ''
- $isHtml : bool = true
Tags
assertNull()
Asserts that a variable is null.
assertNull(mixed $actual[, string $message = '' ]) : mixed
Parameters
- $actual : mixed
- $message : string = ''
assertObjectHasAttribute()
Asserts that an object has a specified attribute.
assertObjectHasAttribute(string $attributeName, object $object[, string $message = '' ]) : mixed
Parameters
- $attributeName : string
- $object : object
- $message : string = ''
Tags
assertObjectNotHasAttribute()
Asserts that an object does not have a specified attribute.
assertObjectNotHasAttribute(string $attributeName, object $object[, string $message = '' ]) : mixed
Parameters
- $attributeName : string
- $object : object
- $message : string = ''
Tags
assertRegExp()
Asserts that a string matches a given regular expression.
assertRegExp(string $pattern, string $string[, string $message = '' ]) : mixed
Parameters
- $pattern : string
- $string : string
- $message : string = ''
assertSame()
Asserts that two variables have the same type and value.
assertSame(mixed $expected, mixed $actual[, string $message = '' ]) : mixed
Used on objects, it asserts that two variables reference the same object.
Parameters
- $expected : mixed
- $actual : mixed
- $message : string = ''
assertSameSize()
Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same.
assertSameSize(array<string|int, mixed>|Countable|Traversable $expected, array<string|int, mixed>|Countable|Traversable $actual[, string $message = '' ]) : mixed
Parameters
- $expected : array<string|int, mixed>|Countable|Traversable
- $actual : array<string|int, mixed>|Countable|Traversable
- $message : string = ''
assertSelectCount()
Assert the presence, absence, or count of elements in a document matching the CSS $selector, regardless of the contents of those elements.
assertSelectCount(array<string|int, mixed> $selector, int $count, mixed $actual[, string $message = '' ][, bool $isHtml = true ]) : mixed
The first argument, $selector, is the CSS selector used to match the elements in the $actual document.
The second argument, $count, can be either boolean or numeric. When boolean, it asserts for presence of elements matching the selector (true) or absence of elements (false). When numeric, it asserts the count of elements.
assertSelectCount("#binder", true, $xml); // any? assertSelectCount(".binder", 3, $xml); // exactly 3?
Parameters
- $selector : array<string|int, mixed>
- $count : int
- $actual : mixed
- $message : string = ''
- $isHtml : bool = true
Tags
assertSelectEquals()
assertSelectEquals("#binder .name", "Chuck", true, $xml); // any? assertSelectEquals("#binder .name", "Chuck", false, $xml); // none?
assertSelectEquals(array<string|int, mixed> $selector, string $content, int $count, mixed $actual[, string $message = '' ][, bool $isHtml = true ]) : mixed
Parameters
- $selector : array<string|int, mixed>
- $content : string
- $count : int
- $actual : mixed
- $message : string = ''
- $isHtml : bool = true
Tags
assertSelectRegExp()
assertSelectRegExp("#binder .name", "/Mike|Derek/", true, $xml); // any? assertSelectRegExp("#binder .name", "/Mike|Derek/", 3, $xml);// 3?
assertSelectRegExp(array<string|int, mixed> $selector, string $pattern, int $count, mixed $actual[, string $message = '' ][, bool $isHtml = true ]) : mixed
Parameters
- $selector : array<string|int, mixed>
- $pattern : string
- $count : int
- $actual : mixed
- $message : string = ''
- $isHtml : bool = true
Tags
assertStringEndsNotWith()
Asserts that a string ends not with a given prefix.
assertStringEndsNotWith(string $suffix, string $string[, string $message = '' ]) : mixed
Parameters
- $suffix : string
- $string : string
- $message : string = ''
Tags
assertStringEndsWith()
Asserts that a string ends with a given prefix.
assertStringEndsWith(string $suffix, string $string[, string $message = '' ]) : mixed
Parameters
- $suffix : string
- $string : string
- $message : string = ''
Tags
assertStringEqualsFile()
Asserts that the contents of a string is equal to the contents of a file.
assertStringEqualsFile(string $expectedFile, string $actualString[, string $message = '' ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : mixed
Parameters
- $expectedFile : string
- $actualString : string
- $message : string = ''
- $canonicalize : bool = false
- $ignoreCase : bool = false
Tags
assertStringMatchesFormat()
Asserts that a string matches a given format string.
assertStringMatchesFormat(string $format, string $string[, string $message = '' ]) : mixed
Parameters
- $format : string
- $string : string
- $message : string = ''
Tags
assertStringMatchesFormatFile()
Asserts that a string matches a given format file.
assertStringMatchesFormatFile(string $formatFile, string $string[, string $message = '' ]) : mixed
Parameters
- $formatFile : string
- $string : string
- $message : string = ''
Tags
assertStringNotEqualsFile()
Asserts that the contents of a string is not equal to the contents of a file.
assertStringNotEqualsFile(string $expectedFile, string $actualString[, string $message = '' ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : mixed
Parameters
- $expectedFile : string
- $actualString : string
- $message : string = ''
- $canonicalize : bool = false
- $ignoreCase : bool = false
Tags
assertStringNotMatchesFormat()
Asserts that a string does not match a given format string.
assertStringNotMatchesFormat(string $format, string $string[, string $message = '' ]) : mixed
Parameters
- $format : string
- $string : string
- $message : string = ''
Tags
assertStringNotMatchesFormatFile()
Asserts that a string does not match a given format string.
assertStringNotMatchesFormatFile(string $formatFile, string $string[, string $message = '' ]) : mixed
Parameters
- $formatFile : string
- $string : string
- $message : string = ''
Tags
assertStringStartsNotWith()
Asserts that a string starts not with a given prefix.
assertStringStartsNotWith(string $prefix, string $string[, string $message = '' ]) : mixed
Parameters
- $prefix : string
- $string : string
- $message : string = ''
Tags
assertStringStartsWith()
Asserts that a string starts with a given prefix.
assertStringStartsWith(string $prefix, string $string[, string $message = '' ]) : mixed
Parameters
- $prefix : string
- $string : string
- $message : string = ''
Tags
assertTag()
Evaluate an HTML or XML string and assert its structure and/or contents.
assertTag(array<string|int, mixed> $matcher, string $actual[, string $message = '' ][, bool $isHtml = true ]) : mixed
The first argument ($matcher) is an associative array that specifies the match criteria for the assertion:
-
id
: the node with the given id attribute must match the corresponding value. -
tag
: the node type must match the corresponding value. -
attributes
: a hash. The node's attributes must match the corresponding values in the hash. -
content
: The text content must match the given value. -
parent
: a hash. The node's parent must match the corresponding hash. -
child
: a hash. At least one of the node's immediate children must meet the criteria described by the hash. -
ancestor
: a hash. At least one of the node's ancestors must meet the criteria described by the hash. -
descendant
: a hash. At least one of the node's descendants must meet the criteria described by the hash. -
children
: a hash, for counting children of a node. Accepts the keys: -
count
: a number which must equal the number of children that match -
less_than
: the number of matching children must be greater than this number -
greater_than
: the number of matching children must be less than this number -
only
: another hash consisting of the keys to use to match on the children, and only matching children will be counted
// Matcher that asserts that there is an element with an id="my_id".
$matcher = array('id' => 'my_id');
// Matcher that asserts that there is a "span" tag.
$matcher = array('tag' => 'span');
// Matcher that asserts that there is a "span" tag with the content
// "Hello World".
$matcher = array('tag' => 'span', 'content' => 'Hello World');
// Matcher that asserts that there is a "span" tag with content matching
// the regular expression pattern.
$matcher = array('tag' => 'span', 'content' => 'regexp:/Try P(HP|ython)/');
// Matcher that asserts that there is a "span" with an "list" class
// attribute.
$matcher = array(
'tag'=> 'span',
'attributes' => array('class' => 'list')
);
// Matcher that asserts that there is a "span" inside of a "div".
$matcher = array(
'tag'=> 'span',
'parent' => array('tag' => 'div')
);
// Matcher that asserts that there is a "span" somewhere inside a
// "table".
$matcher = array(
'tag' => 'span',
'ancestor' => array('tag' => 'table')
);
// Matcher that asserts that there is a "span" with at least one "em"
// child.
$matcher = array(
'tag' => 'span',
'child' => array('tag' => 'em')
);
// Matcher that asserts that there is a "span" containing a (possibly
// nested) "strong" tag.
$matcher = array(
'tag'=> 'span',
'descendant' => array('tag' => 'strong')
);
// Matcher that asserts that there is a "span" containing 5-10 "em" tags
// as immediate children.
$matcher = array(
'tag' => 'span',
'children' => array(
'less_than'=> 11,
'greater_than' => 4,
'only' => array('tag' => 'em')
)
);
// Matcher that asserts that there is a "div", with an "ul" ancestor and
// a "li" parent (with class="enum"), and containing a "span" descendant
// that contains an element with id="my_test" and the text "Hello World".
$matcher = array(
'tag'=> 'div',
'ancestor' => array('tag' => 'ul'),
'parent' => array(
'tag'=> 'li',
'attributes' => array('class' => 'enum')
),
'descendant' => array(
'tag' => 'span',
'child' => array(
'id' => 'my_test',
'content' => 'Hello World'
)
)
);
// Use assertTag() to apply a $matcher to a piece of $html.
$this->assertTag($matcher, $html);
// Use assertTag() to apply a $matcher to a piece of $xml.
$this->assertTag($matcher, $xml, '', false);
The second argument ($actual) is a string containing either HTML or XML text to be tested.
The third argument ($message) is an optional message that will be used if the assertion fails.
The fourth argument ($html) is an optional flag specifying whether to load the $actual string into a DOMDocument using the HTML or XML load strategy. It is true by default, which assumes the HTML load strategy. In many cases, this will be acceptable for XML as well.
Parameters
- $matcher : array<string|int, mixed>
- $actual : string
- $message : string = ''
- $isHtml : bool = true
Tags
assertThat()
Evaluates a PHPUnit_Framework_Constraint matcher object.
assertThat(mixed $value, PHPUnit_Framework_Constraint $constraint[, string $message = '' ]) : mixed
Parameters
- $value : mixed
- $constraint : PHPUnit_Framework_Constraint
- $message : string = ''
Tags
assertTrue()
Asserts that a condition is true.
assertTrue(bool $condition[, string $message = '' ]) : mixed
Parameters
- $condition : bool
- $message : string = ''
Tags
assertXmlFileEqualsXmlFile()
Asserts that two XML files are equal.
assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile[, string $message = '' ]) : mixed
Parameters
- $expectedFile : string
- $actualFile : string
- $message : string = ''
Tags
assertXmlFileNotEqualsXmlFile()
Asserts that two XML files are not equal.
assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile[, string $message = '' ]) : mixed
Parameters
- $expectedFile : string
- $actualFile : string
- $message : string = ''
Tags
assertXmlStringEqualsXmlFile()
Asserts that two XML documents are equal.
assertXmlStringEqualsXmlFile(string $expectedFile, string $actualXml[, string $message = '' ]) : mixed
Parameters
- $expectedFile : string
- $actualXml : string
- $message : string = ''
Tags
assertXmlStringEqualsXmlString()
Asserts that two XML documents are equal.
assertXmlStringEqualsXmlString(string $expectedXml, string $actualXml[, string $message = '' ]) : mixed
Parameters
- $expectedXml : string
- $actualXml : string
- $message : string = ''
Tags
assertXmlStringNotEqualsXmlFile()
Asserts that two XML documents are not equal.
assertXmlStringNotEqualsXmlFile(string $expectedFile, string $actualXml[, string $message = '' ]) : mixed
Parameters
- $expectedFile : string
- $actualXml : string
- $message : string = ''
Tags
assertXmlStringNotEqualsXmlString()
Asserts that two XML documents are not equal.
assertXmlStringNotEqualsXmlString(string $expectedXml, string $actualXml[, string $message = '' ]) : mixed
Parameters
- $expectedXml : string
- $actualXml : string
- $message : string = ''
Tags
at()
Returns a matcher that matches when the method is executed at the given $index.
at(int $index) : PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex
Parameters
- $index : int
Tags
atLeastOnce()
Returns a matcher that matches when the method is executed at least once.
atLeastOnce() : PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce
Tags
attribute()
Returns a PHPUnit_Framework_Constraint_Attribute matcher object.
attribute(PHPUnit_Framework_Constraint $constraint, string $attributeName) : PHPUnit_Framework_Constraint_Attribute
Parameters
- $constraint : PHPUnit_Framework_Constraint
- $attributeName : string
Tags
attributeEqualTo()
Returns a PHPUnit_Framework_Constraint_IsEqual matcher object that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher object.
attributeEqualTo(string $attributeName, mixed $value[, float $delta = 0.0 ][, int $maxDepth = 10 ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : PHPUnit_Framework_Constraint_Attribute
Parameters
- $attributeName : string
- $value : mixed
- $delta : float = 0.0
- $maxDepth : int = 10
- $canonicalize : bool = false
- $ignoreCase : bool = false
Tags
callback()
Returns a PHPUnit_Framework_Constraint_Callback matcher object.
callback(callable $callback) : PHPUnit_Framework_Constraint_Callback
Parameters
- $callback : callable
classHasAttribute()
Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.
classHasAttribute(string $attributeName) : PHPUnit_Framework_Constraint_ClassHasAttribute
Parameters
- $attributeName : string
Tags
classHasStaticAttribute()
Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher object.
classHasStaticAttribute(string $attributeName) : PHPUnit_Framework_Constraint_ClassHasStaticAttribute
Parameters
- $attributeName : string
Tags
contains()
Returns a PHPUnit_Framework_Constraint_TraversableContains matcher object.
contains(mixed $value[, bool $checkForObjectIdentity = true ][, bool $checkForNonObjectIdentity = false ]) : PHPUnit_Framework_Constraint_TraversableContains
Parameters
- $value : mixed
- $checkForObjectIdentity : bool = true
- $checkForNonObjectIdentity : bool = false
Tags
containsOnly()
Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.
containsOnly(string $type) : PHPUnit_Framework_Constraint_TraversableContainsOnly
Parameters
- $type : string
Tags
containsOnlyInstancesOf()
Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.
containsOnlyInstancesOf(string $classname) : PHPUnit_Framework_Constraint_TraversableContainsOnly
Parameters
- $classname : string
equalTo()
Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.
equalTo(mixed $value[, float $delta = 0.0 ][, int $maxDepth = 10 ][, bool $canonicalize = false ][, bool $ignoreCase = false ]) : PHPUnit_Framework_Constraint_IsEqual
Parameters
- $value : mixed
- $delta : float = 0.0
- $maxDepth : int = 10
- $canonicalize : bool = false
- $ignoreCase : bool = false
Tags
exactly()
Returns a matcher that matches when the method is executed exactly $count times.
exactly(int $count) : PHPUnit_Framework_MockObject_Matcher_InvokedCount
Parameters
- $count : int
Tags
fileExists()
Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
fileExists() : PHPUnit_Framework_Constraint_FileExists
Tags
greaterThan()
Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.
greaterThan(mixed $value) : PHPUnit_Framework_Constraint_GreaterThan
Parameters
- $value : mixed
Tags
greaterThanOrEqual()
Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_GreaterThan matcher object.
greaterThanOrEqual(mixed $value) : PHPUnit_Framework_Constraint_Or
Parameters
- $value : mixed
Tags
identicalTo()
Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.
identicalTo(mixed $value) : PHPUnit_Framework_Constraint_IsIdentical
Parameters
- $value : mixed
Tags
isEmpty()
Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.
isEmpty() : PHPUnit_Framework_Constraint_IsEmpty
Tags
isFalse()
Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.
isFalse() : PHPUnit_Framework_Constraint_IsFalse
Tags
isInstanceOf()
Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.
isInstanceOf(string $className) : PHPUnit_Framework_Constraint_IsInstanceOf
Parameters
- $className : string
Tags
isJson()
Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
isJson() : PHPUnit_Framework_Constraint_IsJson
Tags
isNull()
Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
isNull() : PHPUnit_Framework_Constraint_IsNull
Tags
isTrue()
Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
isTrue() : PHPUnit_Framework_Constraint_IsTrue
Tags
isType()
Returns a PHPUnit_Framework_Constraint_IsType matcher object.
isType(string $type) : PHPUnit_Framework_Constraint_IsType
Parameters
- $type : string
Tags
lessThan()
Returns a PHPUnit_Framework_Constraint_LessThan matcher object.
lessThan(mixed $value) : PHPUnit_Framework_Constraint_LessThan
Parameters
- $value : mixed
Tags
lessThanOrEqual()
Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_LessThan matcher object.
lessThanOrEqual(mixed $value) : PHPUnit_Framework_Constraint_Or
Parameters
- $value : mixed
Tags
logicalAnd()
Returns a PHPUnit_Framework_Constraint_And matcher object.
logicalAnd() : PHPUnit_Framework_Constraint_And
Tags
logicalNot()
Returns a PHPUnit_Framework_Constraint_Not matcher object.
logicalNot(PHPUnit_Framework_Constraint $constraint) : PHPUnit_Framework_Constraint_Not
Parameters
- $constraint : PHPUnit_Framework_Constraint
Tags
logicalOr()
Returns a PHPUnit_Framework_Constraint_Or matcher object.
logicalOr() : PHPUnit_Framework_Constraint_Or
Tags
logicalXor()
Returns a PHPUnit_Framework_Constraint_Xor matcher object.
logicalXor() : PHPUnit_Framework_Constraint_Xor
Tags
matches()
Returns a PHPUnit_Framework_Constraint_StringMatches matcher object.
matches(string $string) : PHPUnit_Framework_Constraint_StringMatches
Parameters
- $string : string
Tags
matchesRegularExpression()
Returns a PHPUnit_Framework_Constraint_PCREMatch matcher object.
matchesRegularExpression(string $pattern) : PHPUnit_Framework_Constraint_PCREMatch
Parameters
- $pattern : string
Tags
never()
Returns a matcher that matches when the method is never executed.
never() : PHPUnit_Framework_MockObject_Matcher_InvokedCount
Tags
objectHasAttribute()
Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.
objectHasAttribute(string $attributeName) : PHPUnit_Framework_Constraint_ObjectHasAttribute
Parameters
- $attributeName : string
Tags
onConsecutiveCalls()
onConsecutiveCalls() : PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls
Tags
once()
Returns a matcher that matches when the method is executed exactly once.
once() : PHPUnit_Framework_MockObject_Matcher_InvokedCount
Tags
returnArgument()
returnArgument(int $argumentIndex) : PHPUnit_Framework_MockObject_Stub_ReturnArgument
Parameters
- $argumentIndex : int
Tags
returnCallback()
returnCallback(mixed $callback) : PHPUnit_Framework_MockObject_Stub_ReturnCallback
Parameters
- $callback : mixed
Tags
returnSelf()
Returns the current object.
returnSelf() : PHPUnit_Framework_MockObject_Stub_ReturnSelf
This method is useful when mocking a fluent interface.
Tags
returnValue()
returnValue(mixed $value) : PHPUnit_Framework_MockObject_Stub_Return
Parameters
- $value : mixed
Tags
returnValueMap()
returnValueMap(array<string|int, mixed> $valueMap) : PHPUnit_Framework_MockObject_Stub_ReturnValueMap
Parameters
- $valueMap : array<string|int, mixed>
Tags
stringContains()
Returns a PHPUnit_Framework_Constraint_StringContains matcher object.
stringContains(string $string[, bool $case = true ]) : PHPUnit_Framework_Constraint_StringContains
Parameters
- $string : string
- $case : bool = true
Tags
stringEndsWith()
Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.
stringEndsWith(mixed $suffix) : PHPUnit_Framework_Constraint_StringEndsWith
Parameters
- $suffix : mixed
Tags
stringStartsWith()
Returns a PHPUnit_Framework_Constraint_StringStartsWith matcher object.
stringStartsWith(mixed $prefix) : PHPUnit_Framework_Constraint_StringStartsWith
Parameters
- $prefix : mixed
Tags
throwException()
throwException(Exception $exception) : PHPUnit_Framework_MockObject_Stub_Exception
Parameters
- $exception : Exception