Documentation

Framework_AssertTest extends PHPUnit_Framework_TestCase
in package

A TestCase defines the fixture to run multiple tests.

Tags
since

Class available since Release 2.0.0

Table of Contents

$backupGlobals  : bool
Enable or disable the backup and restoration of the $GLOBALS array.
$backupGlobalsBlacklist  : array<string|int, mixed>
$backupStaticAttributes  : bool
Enable or disable the backup and restoration of static attributes.
$backupStaticAttributesBlacklist  : array<string|int, mixed>
$preserveGlobalState  : bool
Whether or not this test should preserve the global state when running in a separate PHP process.
$runTestInSeparateProcess  : bool
Whether or not this test is to be run in a separate PHP process.
$count  : int
$data  : array<string|int, mixed>
$dataName  : string
$dependencies  : array<string|int, mixed>
$dependencyInput  : array<string|int, mixed>
$disallowChangesToGlobalState  : bool
$expectedException  : mixed
The name of the expected Exception.
$expectedExceptionCode  : int
The code of the expected Exception.
$expectedExceptionMessage  : string
The message of the expected Exception.
$expectedExceptionMessageRegExp  : string
The regex pattern to validate the expected Exception message.
$filesDirectory  : string
$iniSettings  : array<string|int, mixed>
$inIsolation  : bool
Whether or not this test is running in a separate PHP process.
$locale  : array<string|int, mixed>
$mockObjectGenerator  : array<string|int, mixed>
$mockObjects  : array<string|int, mixed>
$name  : string
The name of the test case.
$numAssertions  : int
$output  : string
$outputBufferingActive  : bool
$outputBufferingLevel  : int
$outputCallback  : mixed
$outputExpectedRegex  : string
$outputExpectedString  : string
$prophet  : Prophet
$result  : PHPUnit_Framework_TestResult
$snapshot  : Snapshot
$status  : int
$statusMessage  : string
$testResult  : mixed
$useErrorHandler  : bool
__construct()  : mixed
Constructs a test case with the given name.
addToAssertionCount()  : mixed
Adds a value to the assertion counter.
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.
assertArrayNotHasKey()  : mixed
Asserts that an array does not have a specified key.
assertArraySubset()  : mixed
Asserts that an array has a specified subset.
assertArraySubsetInvalidArgumentProvider()  : array<string|int, mixed>
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.
assertEquals()  : mixed
Asserts that two variables are equal.
assertEqualXMLStructure()  : mixed
Asserts that a hierarchy of DOMElements matches.
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.
assertNotFalse()  : mixed
Asserts that a condition is not false.
assertNotInstanceOf()  : mixed
Asserts that a variable is not of a given type.
assertNotInternalType()  : mixed
Asserts that a variable is not of a given type.
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().
assertNotTrue()  : mixed
Asserts that a condition is not true.
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 suffix.
assertStringEndsWith()  : mixed
Asserts that a string ends with a given suffix.
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.
atLeast()  : PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount
Returns a matcher that matches when the method is executed at least N times.
atLeastOnce()  : PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce
Returns a matcher that matches when the method is executed at least once.
atMost()  : PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount
Returns a matcher that matches when the method is executed at most N times.
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.
count()  : int
Counts the number of test cases executed by run(TestResult result).
countOf()  : PHPUnit_Framework_Constraint_Count
Returns a PHPUnit_Framework_Constraint_Count matcher object.
equalProvider()  : mixed
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.
expectOutputRegex()  : mixed
expectOutputString()  : mixed
fail()  : mixed
Fails a test with the given message.
fileExists()  : PHPUnit_Framework_Constraint_FileExists
Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
getActualOutput()  : string
getAnnotations()  : array<string|int, mixed>
Returns the annotations for this test.
getCount()  : int
Return the current assertion count.
getExpectedException()  : string
getMock()  : PHPUnit_Framework_MockObject_MockObject
Returns a mock object for the specified class.
getMockBuilder()  : PHPUnit_Framework_MockObject_MockBuilder
Returns a builder object to create mock objects using a fluent interface.
getMockForAbstractClass()  : PHPUnit_Framework_MockObject_MockObject
Returns a mock object for the specified abstract class with all abstract methods of the class mocked. Concrete methods are not mocked by default.
getMockForTrait()  : PHPUnit_Framework_MockObject_MockObject
Returns a mock object for the specified trait with all abstract methods of the trait mocked. Concrete methods to mock can be specified with the `$mockedMethods` parameter.
getName()  : string
Gets the name of a TestCase.
getNumAssertions()  : int
Returns the number of assertions performed by this test.
getObjectAttribute()  : mixed
Returns the value of an object's attribute.
getResult()  : mixed
getSize()  : int
Returns the size of the test.
getStaticAttribute()  : mixed
Returns the value of a static attribute.
getStatus()  : int
Returns the status of this test.
getStatusMessage()  : string
Returns the status message of this test.
getTestResultObject()  : PHPUnit_Framework_TestResult
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.
hasDependencies()  : bool
Returns true if the tests has dependencies
hasExpectationOnOutput()  : bool
hasFailed()  : bool
Returns whether or not this test has failed.
hasOutput()  : bool
hasPerformedExpectationsOnOutput()  : bool
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.
isInIsolation()  : bool
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.
markTestIncomplete()  : mixed
Mark the test as incomplete.
markTestSkipped()  : mixed
Mark the test as skipped.
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.
notEqualProvider()  : mixed
notSameProvider()  : mixed
objectHasAttribute()  : PHPUnit_Framework_Constraint_ObjectHasAttribute
Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.
once()  : PHPUnit_Framework_MockObject_Matcher_InvokedCount
Returns a matcher that matches when the method is executed exactly once.
onConsecutiveCalls()  : PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls
readAttribute()  : mixed
Returns the value of an attribute of a class or an object.
resetCount()  : mixed
Reset the assertion counter.
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
run()  : PHPUnit_Framework_TestResult
Runs the test case and collects the results in a TestResult object.
runBare()  : mixed
Runs the bare test sequence.
sameProvider()  : mixed
setBackupGlobals()  : mixed
Calling this method in setUp() has no effect!
setBackupStaticAttributes()  : mixed
Calling this method in setUp() has no effect!
setDependencies()  : mixed
Sets the dependencies of a TestCase.
setDependencyInput()  : mixed
Sets
setDisallowChangesToGlobalState()  : mixed
setExpectedException()  : mixed
setExpectedExceptionRegExp()  : mixed
setInIsolation()  : mixed
setName()  : mixed
Sets the name of a TestCase.
setOutputCallback()  : mixed
setPreserveGlobalState()  : mixed
setResult()  : mixed
setRunTestInSeparateProcess()  : mixed
setTestResultObject()  : mixed
setUpBeforeClass()  : mixed
This method is called before the first test of this test class is run.
setUseErrorHandler()  : mixed
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.
tearDownAfterClass()  : mixed
This method is called after the last test of this test class is run.
testAssertArrayContainsNonObject()  : mixed
testAssertArrayContainsObject()  : mixed
testAssertArrayContainsOnlyIntegers()  : mixed
testAssertArrayContainsOnlyStdClass()  : mixed
testAssertArrayContainsString()  : mixed
testAssertArrayHasIntegerKey()  : mixed
testAssertArrayHasKeyAcceptsArrayAccessValue()  : mixed
testAssertArrayHasKeyAcceptsArrayObjectValue()  : mixed
testAssertArrayHasKeyProperlyFailsWithArrayAccessValue()  : mixed
testAssertArrayHasKeyProperlyFailsWithArrayObjectValue()  : mixed
testAssertArrayHasKeyThrowsExceptionForInvalidFirstArgument()  : mixed
testAssertArrayHasKeyThrowsExceptionForInvalidSecondArgument()  : mixed
testAssertArrayHasStringKey()  : mixed
testAssertArrayNotContainsNonObject()  : mixed
testAssertArrayNotContainsObject()  : mixed
testAssertArrayNotContainsOnlyIntegers()  : mixed
testAssertArrayNotContainsOnlyStdClass()  : mixed
testAssertArrayNotContainsString()  : mixed
testAssertArrayNotHasIntegerKey()  : mixed
testAssertArrayNotHasKeyAcceptsArrayAccessValue()  : mixed
testAssertArrayNotHasKeyPropertlyFailsWithArrayAccessValue()  : mixed
testAssertArrayNotHasKeyThrowsExceptionForInvalidFirstArgument()  : mixed
testAssertArrayNotHasKeyThrowsExceptionForInvalidSecondArgument()  : mixed
testAssertArrayNotHasStringKey()  : mixed
testAssertArraySubset()  : mixed
testAssertArraySubsetRaisesExceptionForInvalidArguments()  : mixed
testAssertArraySubsetWithDeepNestedArrays()  : mixed
testAssertArraySubsetWithNoStrictCheckAndObjects()  : mixed
testAssertArraySubsetWithStrictCheckAndObjects()  : mixed
testAssertAttributeContainsNonObject()  : mixed
testAssertAttributeCount()  : mixed
testAssertAttributeEmpty()  : mixed
testAssertAttributeInstanceOf()  : mixed
testAssertAttributeInternalType()  : mixed
testAssertAttributeNotContainsNonObject()  : mixed
testAssertAttributeNotCount()  : mixed
testAssertAttributeNotEmpty()  : mixed
testAssertAttributeNotInstanceOf()  : mixed
testAssertAttributeNotInternalType()  : mixed
testAssertClassHasAttributeThrowsException()  : mixed
testAssertClassHasAttributeThrowsException2()  : mixed
testAssertClassHasAttributeThrowsExceptionIfAttributeNameIsNotValid()  : mixed
testAssertClassHasStaticAttributeThrowsException()  : mixed
testAssertClassHasStaticAttributeThrowsException2()  : mixed
testAssertClassHasStaticAttributeThrowsExceptionIfAttributeNameIsNotValid()  : mixed
testAssertClassNotHasAttributeThrowsException()  : mixed
testAssertClassNotHasAttributeThrowsException2()  : mixed
testAssertClassNotHasAttributeThrowsExceptionIfAttributeNameIsNotValid()  : mixed
testAssertClassNotHasStaticAttributeThrowsException()  : mixed
testAssertClassNotHasStaticAttributeThrowsException2()  : mixed
testAssertClassNotHasStaticAttributeThrowsExceptionIfAttributeNameIsNotValid()  : mixed
testAssertContainsOnlyInstancesOf()  : mixed
testAssertContainsOnlyInstancesOfThrowsException()  : mixed
testAssertContainsOnlyThrowsException()  : mixed
testAssertContainsThrowsException()  : mixed
testAssertCount()  : mixed
testAssertCountThrowsExceptionIfElementIsNotCountable()  : mixed
testAssertCountThrowsExceptionIfExpectedCountIsNoInteger()  : mixed
testAssertCountTraversable()  : mixed
testAssertEmpty()  : mixed
testAssertEqualsFails()  : mixed
testAssertEqualsSucceeds()  : mixed
testAssertFalse()  : mixed
testAssertFileEquals()  : mixed
testAssertFileExists()  : mixed
testAssertFileExistsThrowsException()  : mixed
testAssertFileNotEquals()  : mixed
testAssertFileNotExists()  : mixed
testAssertFileNotExistsThrowsException()  : mixed
testAssertInstanceOf()  : mixed
testAssertInstanceOfThrowsExceptionForInvalidArgument()  : mixed
testAssertInternalType()  : mixed
testAssertInternalTypeDouble()  : mixed
testAssertInternalTypeThrowsExceptionForInvalidArgument()  : mixed
testAssertIteratorContainsObject()  : mixed
testAssertIteratorContainsString()  : mixed
testAssertJson()  : mixed
testAssertJsonFileEqualsJsonFile()  : mixed
testAssertJsonFileNotEqualsJsonFile()  : mixed
testAssertJsonRaisesExceptionForInvalidArgument()  : mixed
testAssertJsonStringEqualsJsonFile()  : mixed
testAssertJsonStringEqualsJsonFileExpectingException()  : mixed
testAssertJsonStringEqualsJsonFileExpectingExpectationFailedException()  : mixed
testAssertJsonStringEqualsJsonString()  : mixed
testAssertJsonStringEqualsJsonStringErrorRaised()  : mixed
testAssertJsonStringNotEqualsJsonFile()  : mixed
testAssertJsonStringNotEqualsJsonFileExpectingException()  : mixed
testAssertJsonStringNotEqualsJsonString()  : mixed
testAssertJsonStringNotEqualsJsonStringErrorRaised()  : mixed
testAssertNotContainsOnlyThrowsException()  : mixed
testAssertNotContainsThrowsException()  : mixed
testAssertNotCount()  : mixed
testAssertNotCountThrowsExceptionIfElementIsNotCountable()  : mixed
testAssertNotCountThrowsExceptionIfExpectedCountIsNoInteger()  : mixed
testAssertNotEmpty()  : mixed
testAssertNotEqualsFails()  : mixed
testAssertNotEqualsSucceeds()  : mixed
testAssertNotFalse()  : mixed
testAssertNotInstanceOf()  : mixed
testAssertNotInstanceOfThrowsExceptionForInvalidArgument()  : mixed
testAssertNotInternalType()  : mixed
testAssertNotInternalTypeThrowsExceptionForInvalidArgument()  : mixed
testAssertNotNull()  : mixed
testAssertNotRegExp()  : mixed
testAssertNotRegExpThrowsException()  : mixed
testAssertNotRegExpThrowsException2()  : mixed
testAssertNotSame()  : mixed
testAssertNotSame2()  : mixed
testAssertNotSameFails()  : mixed
testAssertNotSameFailsNull()  : mixed
testAssertNotSameSize()  : mixed
testAssertNotSameSizeThrowsExceptionIfActualIsNotCountable()  : mixed
testAssertNotSameSizeThrowsExceptionIfExpectedIsNotCountable()  : mixed
testAssertNotSameSucceeds()  : mixed
testAssertNotTrue()  : mixed
testAssertNull()  : mixed
testAssertObjectHasAttribute()  : mixed
testAssertObjectHasAttributeThrowsException()  : mixed
testAssertObjectHasAttributeThrowsException2()  : mixed
testAssertObjectHasAttributeThrowsExceptionIfAttributeNameIsNotValid()  : mixed
testAssertObjectNotHasAttribute()  : mixed
testAssertObjectNotHasAttributeThrowsException()  : mixed
testAssertObjectNotHasAttributeThrowsException2()  : mixed
testAssertObjectNotHasAttributeThrowsExceptionIfAttributeNameIsNotValid()  : mixed
testAssertPrivateAttributeContains()  : mixed
testAssertPrivateAttributeEquals()  : mixed
testAssertPrivateAttributeNotContains()  : mixed
testAssertPrivateAttributeNotEquals()  : mixed
testAssertPrivateStaticAttributeEquals()  : mixed
testAssertPrivateStaticAttributeNotEquals()  : mixed
testAssertProtectedAttributeContains()  : mixed
testAssertProtectedAttributeEquals()  : mixed
testAssertProtectedAttributeNotContains()  : mixed
testAssertProtectedAttributeNotEquals()  : mixed
testAssertProtectedStaticAttributeEquals()  : mixed
testAssertProtectedStaticAttributeNotEquals()  : mixed
testAssertPublicAttributeContains()  : mixed
testAssertPublicAttributeContainsOnly()  : mixed
testAssertPublicAttributeEquals()  : mixed
testAssertPublicAttributeNotContains()  : mixed
testAssertPublicAttributeNotContainsOnly()  : mixed
testAssertPublicAttributeNotEquals()  : mixed
testAssertPublicAttributeNotSame()  : mixed
testAssertPublicAttributeSame()  : mixed
testAssertPublicStaticAttributeEquals()  : mixed
testAssertPublicStaticAttributeNotEquals()  : mixed
testAssertRegExp()  : mixed
testAssertRegExpThrowsException()  : mixed
testAssertRegExpThrowsException2()  : mixed
testAssertSame()  : mixed
testAssertSame2()  : mixed
testAssertSameFails()  : mixed
testAssertSameSize()  : mixed
testAssertSameSizeThrowsExceptionIfActualIsNotCountable()  : mixed
testAssertSameSizeThrowsExceptionIfExpectedIsNotCountable()  : mixed
testAssertSameSucceeds()  : mixed
testAssertSplObjectStorageContainsObject()  : mixed
testAssertSplObjectStorageNotContainsObject()  : mixed
testAssertStringContainsString()  : mixed
testAssertStringEndsNotWith()  : mixed
testAssertStringEndsNotWithThrowsException()  : mixed
testAssertStringEndsNotWithThrowsException2()  : mixed
testAssertStringEndsWith()  : mixed
testAssertStringEndsWithThrowsException()  : mixed
testAssertStringEndsWithThrowsException2()  : mixed
testAssertStringEqualsFile()  : mixed
testAssertStringEqualsNumeric()  : mixed
testAssertStringEqualsNumeric2()  : mixed
testAssertStringMatchesFormat()  : mixed
testAssertStringMatchesFormatFailure()  : mixed
testAssertStringMatchesFormatFile()  : mixed
testAssertStringMatchesFormatFileThrowsExceptionForInvalidArgument()  : mixed
testAssertStringMatchesFormatFileThrowsExceptionForInvalidArgument2()  : mixed
testAssertStringMatchesFormatRaisesExceptionForInvalidFirstArgument()  : mixed
testAssertStringMatchesFormatRaisesExceptionForInvalidSecondArgument()  : mixed
testAssertStringNotContainsString()  : mixed
testAssertStringNotEqualsFile()  : mixed
testAssertStringNotMatchesFormat()  : mixed
testAssertStringNotMatchesFormatFile()  : mixed
testAssertStringNotMatchesFormatFileThrowsExceptionForInvalidArgument()  : mixed
testAssertStringNotMatchesFormatFileThrowsExceptionForInvalidArgument2()  : mixed
testAssertStringNotMatchesFormatRaisesExceptionForInvalidFirstArgument()  : mixed
testAssertStringNotMatchesFormatRaisesExceptionForInvalidSecondArgument()  : mixed
testAssertStringStartsNotWith()  : mixed
testAssertStringStartsNotWithThrowsException()  : mixed
testAssertStringStartsNotWithThrowsException2()  : mixed
testAssertStringStartsWith()  : mixed
testAssertStringStartsWithThrowsException()  : mixed
testAssertStringStartsWithThrowsException2()  : mixed
testAssertThatAnything()  : mixed
testAssertThatAnythingAndAnything()  : mixed
testAssertThatAnythingOrAnything()  : mixed
testAssertThatAnythingXorNotAnything()  : mixed
testAssertThatArrayHasKey()  : mixed
testAssertThatAttributeEquals()  : mixed
testAssertThatAttributeEquals2()  : mixed
testAssertThatAttributeEqualTo()  : mixed
testAssertThatCallback()  : mixed
testAssertThatClassHasAttribute()  : mixed
testAssertThatClassHasStaticAttribute()  : mixed
testAssertThatContains()  : mixed
testAssertThatContainsOnly()  : mixed
testAssertThatContainsOnlyInstancesOf()  : mixed
testAssertThatCountOf()  : mixed
testAssertThatEqualTo()  : mixed
testAssertThatFileExists()  : mixed
testAssertThatGreaterThan()  : mixed
testAssertThatGreaterThanOrEqual()  : mixed
testAssertThatIdenticalTo()  : mixed
testAssertThatIsEmpty()  : mixed
testAssertThatIsFalse()  : mixed
testAssertThatIsInstanceOf()  : mixed
testAssertThatIsJson()  : mixed
testAssertThatIsTrue()  : mixed
testAssertThatIsType()  : mixed
testAssertThatLessThan()  : mixed
testAssertThatLessThanOrEqual()  : mixed
testAssertThatMatchesRegularExpression()  : mixed
testAssertThatObjectHasAttribute()  : mixed
testAssertThatStringContains()  : mixed
testAssertTrue()  : mixed
testAssertXmlFileEqualsXmlFile()  : mixed
testAssertXmlFileNotEqualsXmlFile()  : mixed
testAssertXmlStringEqualsXmlFile()  : mixed
testAssertXmlStringEqualsXmlString()  : mixed
testAssertXmlStringEqualsXmlString2()  : mixed
testAssertXmlStringEqualsXmlString3()  : mixed
testAssertXmlStringNotEqualsXmlString()  : mixed
testAttributeGreaterThan()  : mixed
testAttributeGreaterThanOrEqual()  : mixed
testAttributeLessThan()  : mixed
testAttributeLessThanOrEqual()  : mixed
testClassHasPublicAttribute()  : mixed
testClassHasPublicStaticAttribute()  : mixed
testClassNotHasPublicAttribute()  : mixed
testClassNotHasPublicStaticAttribute()  : mixed
testFail()  : mixed
testGetObjectAttributeRaisesExceptionForInvalidFirstArgument()  : mixed
testGetObjectAttributeRaisesExceptionForInvalidSecondArgument()  : mixed
testGetObjectAttributeRaisesExceptionForInvalidSecondArgument2()  : mixed
testGetObjectAttributeRaisesExceptionForInvalidSecondArgument3()  : mixed
testGetObjectAttributeWorksForInheritedAttributes()  : mixed
testGetStaticAttributeRaisesExceptionForInvalidFirstArgument()  : mixed
testGetStaticAttributeRaisesExceptionForInvalidFirstArgument2()  : mixed
testGetStaticAttributeRaisesExceptionForInvalidSecondArgument()  : mixed
testGetStaticAttributeRaisesExceptionForInvalidSecondArgument2()  : mixed
testGetStaticAttributeRaisesExceptionForInvalidSecondArgument3()  : mixed
testGreaterThan()  : mixed
testGreaterThanOrEqual()  : mixed
testLessThan()  : mixed
testLessThanOrEqual()  : mixed
testMarkTestIncomplete()  : mixed
testMarkTestSkipped()  : mixed
testObjectHasOnTheFlyAttribute()  : mixed
testObjectHasPrivateAttribute()  : mixed
testObjectHasProtectedAttribute()  : mixed
testObjectHasPublicAttribute()  : mixed
testObjectNotHasOnTheFlyAttribute()  : mixed
testObjectNotHasPrivateAttribute()  : mixed
testObjectNotHasProtectedAttribute()  : mixed
testObjectNotHasPublicAttribute()  : mixed
testReadAttribute()  : mixed
testReadAttribute2()  : mixed
testReadAttribute3()  : mixed
testReadAttribute4()  : mixed
testReadAttribute5()  : mixed
testReadAttributeIfAttributeNameIsNotValid()  : mixed
testXmlStringNotEqualsXmlFile()  : mixed
testXMLStructureAttributesAreSameButValuesAreNot()  : mixed
testXMLStructureIgnoreTextNodes()  : mixed
testXMLStructureIsSame()  : mixed
testXMLStructureIsSameButDataIsNot()  : mixed
testXMLStructureWrongNumberOfAttributes()  : mixed
testXMLStructureWrongNumberOfNodes()  : mixed
throwException()  : PHPUnit_Framework_MockObject_Stub_Exception
toString()  : string
Returns a string representation of the test case.
validInvalidJsonDataprovider()  : array<string|int, mixed>
assertPostConditions()  : mixed
Performs assertions shared by all tests of a test case.
assertPreConditions()  : mixed
Performs assertions shared by all tests of a test case.
checkRequirements()  : mixed
createResult()  : PHPUnit_Framework_TestResult
Creates a default TestResult object.
equalValues()  : mixed
getDataSetAsString()  : string
Gets the data set description of a TestCase.
getMockClass()  : string
Mocks the specified class and returns the name of the mocked class.
getMockFromWsdl()  : PHPUnit_Framework_MockObject_MockObject
Returns a mock object based on the given WSDL file.
getMockObjectGenerator()  : PHPUnit_Framework_MockObject_Generator
Get the mock object generator, creating it if it doesn't exist.
getObjectForTrait()  : object
Returns an object for the specified trait.
handleDependencies()  : mixed
iniSet()  : mixed
This method is a wrapper for the ini_set() function that automatically resets the modified php.ini setting to its original value after the test is run.
notEqualValues()  : mixed
onNotSuccessfulTest()  : mixed
This method is called when a test method did not execute successfully.
prepareTemplate()  : mixed
Performs custom preparations on the process isolation template.
prophesize()  : ObjectProphecy
runTest()  : mixed
Override to run the test and assert its state.
sameValues()  : mixed
setExpectedExceptionFromAnnotation()  : mixed
setLocale()  : mixed
This method is a wrapper for the setlocale() function that automatically resets the locale to its original value after the test is run.
setUp()  : mixed
Sets up the fixture, for example, open a network connection.
setUseErrorHandlerFromAnnotation()  : mixed
tearDown()  : mixed
Tears down the fixture, for example, close a network connection.
verifyMockObjects()  : mixed
Verifies the mock object expectations.
compareGlobalStateSnapshotPart()  : mixed
compareGlobalStateSnapshots()  : mixed
createGlobalStateSnapshot()  : Snapshot
getProphet()  : Prophet
restoreGlobalState()  : mixed
snapshotGlobalState()  : mixed
startOutputBuffering()  : mixed
stopOutputBuffering()  : mixed

Properties

$backupGlobals

Enable or disable the backup and restoration of the $GLOBALS array.

protected bool $backupGlobals = ull

Overwrite this attribute in a child class of TestCase. Setting this attribute in setUp() has no effect!

$backupGlobalsBlacklist

protected array<string|int, mixed> $backupGlobalsBlacklist = array()

$backupStaticAttributes

Enable or disable the backup and restoration of static attributes.

protected bool $backupStaticAttributes = ull

Overwrite this attribute in a child class of TestCase. Setting this attribute in setUp() has no effect!

$backupStaticAttributesBlacklist

protected array<string|int, mixed> $backupStaticAttributesBlacklist = array()

$preserveGlobalState

Whether or not this test should preserve the global state when running in a separate PHP process.

protected bool $preserveGlobalState = rue

$runTestInSeparateProcess

Whether or not this test is to be run in a separate PHP process.

protected bool $runTestInSeparateProcess = ull

$count

private static int $count = 0

$data

private array<string|int, mixed> $data = array()

$dataName

private string $dataName = ''

$dependencies

private array<string|int, mixed> $dependencies = array()

$dependencyInput

private array<string|int, mixed> $dependencyInput = array()

$disallowChangesToGlobalState

private bool $disallowChangesToGlobalState = alse

$expectedException

The name of the expected Exception.

private mixed $expectedException = ull

$expectedExceptionCode

The code of the expected Exception.

private int $expectedExceptionCode

$expectedExceptionMessage

The message of the expected Exception.

private string $expectedExceptionMessage = ''

$expectedExceptionMessageRegExp

The regex pattern to validate the expected Exception message.

private string $expectedExceptionMessageRegExp = ''

$iniSettings

private array<string|int, mixed> $iniSettings = array()

$inIsolation

Whether or not this test is running in a separate PHP process.

private bool $inIsolation = alse

$locale

private array<string|int, mixed> $locale = array()

$mockObjectGenerator

private array<string|int, mixed> $mockObjectGenerator = ull

$mockObjects

private array<string|int, mixed> $mockObjects = array()

$name

The name of the test case.

private string $name = ull

$numAssertions

private int $numAssertions = 0

$outputBufferingActive

private bool $outputBufferingActive = alse

$outputBufferingLevel

private int $outputBufferingLevel

$outputCallback

private mixed $outputCallback = alse

$outputExpectedRegex

private string $outputExpectedRegex = ull

$outputExpectedString

private string $outputExpectedString = ull

$statusMessage

private string $statusMessage = ''

$useErrorHandler

private bool $useErrorHandler = ull

Methods

__construct()

Constructs a test case with the given name.

public __construct([string $name = null ][, array<string|int, mixed> $data = array() ][, string $dataName = '' ]) : mixed
Parameters
$name : string = null
$data : array<string|int, mixed> = array()
$dataName : string = ''
Return values
mixed

addToAssertionCount()

Adds a value to the assertion counter.

public addToAssertionCount(int $count) : mixed
Parameters
$count : int
Tags
since

Method available since Release 3.3.3

Return values
mixed

assertArrayHasKey()

Asserts that an array has a specified key.

public static assertArrayHasKey(mixed $key, array<string|int, mixed>|ArrayAccess $array[, string $message = '' ]) : mixed
Parameters
$key : mixed
$array : array<string|int, mixed>|ArrayAccess
$message : string = ''
Tags
since

Method available since Release 3.0.0

Return values
mixed

assertArrayNotHasKey()

Asserts that an array does not have a specified key.

public static assertArrayNotHasKey(mixed $key, array<string|int, mixed>|ArrayAccess $array[, string $message = '' ]) : mixed
Parameters
$key : mixed
$array : array<string|int, mixed>|ArrayAccess
$message : string = ''
Tags
since

Method available since Release 3.0.0

Return values
mixed

assertArraySubset()

Asserts that an array has a specified subset.

public static 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
since

Method available since Release 4.4.0

Return values
mixed

assertArraySubsetInvalidArgumentProvider()

public assertArraySubsetInvalidArgumentProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

assertAttributeContains()

Asserts that a haystack that is stored in a static attribute of a class or an attribute of an object contains a needle.

public static 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
since

Method available since Release 3.0.0

Return values
mixed

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.

public static 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
since

Method available since Release 3.1.4

Return values
mixed

assertAttributeCount()

Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.

public static assertAttributeCount(int $expectedCount, string $haystackAttributeName, mixed $haystackClassOrObject[, string $message = '' ]) : mixed
Parameters
$expectedCount : int
$haystackAttributeName : string
$haystackClassOrObject : mixed
$message : string = ''
Tags
since

Method available since Release 3.6.0

Return values
mixed

assertAttributeEmpty()

Asserts that a static attribute of a class or an attribute of an object is empty.

public static assertAttributeEmpty(string $haystackAttributeName, mixed $haystackClassOrObject[, string $message = '' ]) : mixed
Parameters
$haystackAttributeName : string
$haystackClassOrObject : mixed
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertAttributeEquals()

Asserts that a variable is equal to an attribute of an object.

public static 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
Return values
mixed

assertAttributeGreaterThan()

Asserts that an attribute is greater than another value.

public static assertAttributeGreaterThan(mixed $expected, string $actualAttributeName, string $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
$expected : mixed
$actualAttributeName : string
$actualClassOrObject : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertAttributeGreaterThanOrEqual()

Asserts that an attribute is greater than or equal to another value.

public static assertAttributeGreaterThanOrEqual(mixed $expected, string $actualAttributeName, string $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
$expected : mixed
$actualAttributeName : string
$actualClassOrObject : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertAttributeInstanceOf()

Asserts that an attribute is of a given type.

public static assertAttributeInstanceOf(string $expected, string $attributeName, mixed $classOrObject[, string $message = '' ]) : mixed
Parameters
$expected : string
$attributeName : string
$classOrObject : mixed
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertAttributeInternalType()

Asserts that an attribute is of a given type.

public static assertAttributeInternalType(string $expected, string $attributeName, mixed $classOrObject[, string $message = '' ]) : mixed
Parameters
$expected : string
$attributeName : string
$classOrObject : mixed
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertAttributeLessThan()

Asserts that an attribute is smaller than another value.

public static assertAttributeLessThan(mixed $expected, string $actualAttributeName, string $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
$expected : mixed
$actualAttributeName : string
$actualClassOrObject : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertAttributeLessThanOrEqual()

Asserts that an attribute is smaller than or equal to another value.

public static assertAttributeLessThanOrEqual(mixed $expected, string $actualAttributeName, string $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
$expected : mixed
$actualAttributeName : string
$actualClassOrObject : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

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.

public static 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
since

Method available since Release 3.0.0

Return values
mixed

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.

public static 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
since

Method available since Release 3.1.4

Return values
mixed

assertAttributeNotCount()

Asserts the number of elements of an array, Countable or Traversable that is stored in an attribute.

public static assertAttributeNotCount(int $expectedCount, string $haystackAttributeName, mixed $haystackClassOrObject[, string $message = '' ]) : mixed
Parameters
$expectedCount : int
$haystackAttributeName : string
$haystackClassOrObject : mixed
$message : string = ''
Tags
since

Method available since Release 3.6.0

Return values
mixed

assertAttributeNotEmpty()

Asserts that a static attribute of a class or an attribute of an object is not empty.

public static assertAttributeNotEmpty(string $haystackAttributeName, mixed $haystackClassOrObject[, string $message = '' ]) : mixed
Parameters
$haystackAttributeName : string
$haystackClassOrObject : mixed
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertAttributeNotEquals()

Asserts that a variable is not equal to an attribute of an object.

public static 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
Return values
mixed

assertAttributeNotInstanceOf()

Asserts that an attribute is of a given type.

public static assertAttributeNotInstanceOf(string $expected, string $attributeName, mixed $classOrObject[, string $message = '' ]) : mixed
Parameters
$expected : string
$attributeName : string
$classOrObject : mixed
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertAttributeNotInternalType()

Asserts that an attribute is of a given type.

public static assertAttributeNotInternalType(string $expected, string $attributeName, mixed $classOrObject[, string $message = '' ]) : mixed
Parameters
$expected : string
$attributeName : string
$classOrObject : mixed
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertAttributeNotSame()

Asserts that a variable and an attribute of an object do not have the same type and value.

public static assertAttributeNotSame(mixed $expected, string $actualAttributeName, object $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
$expected : mixed
$actualAttributeName : string
$actualClassOrObject : object
$message : string = ''
Return values
mixed

assertAttributeSame()

Asserts that a variable and an attribute of an object have the same type and value.

public static assertAttributeSame(mixed $expected, string $actualAttributeName, object $actualClassOrObject[, string $message = '' ]) : mixed
Parameters
$expected : mixed
$actualAttributeName : string
$actualClassOrObject : object
$message : string = ''
Return values
mixed

assertClassHasAttribute()

Asserts that a class has a specified attribute.

public static assertClassHasAttribute(string $attributeName, string $className[, string $message = '' ]) : mixed
Parameters
$attributeName : string
$className : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertClassHasStaticAttribute()

Asserts that a class has a specified static attribute.

public static assertClassHasStaticAttribute(string $attributeName, string $className[, string $message = '' ]) : mixed
Parameters
$attributeName : string
$className : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertClassNotHasAttribute()

Asserts that a class does not have a specified attribute.

public static assertClassNotHasAttribute(string $attributeName, string $className[, string $message = '' ]) : mixed
Parameters
$attributeName : string
$className : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertClassNotHasStaticAttribute()

Asserts that a class does not have a specified static attribute.

public static assertClassNotHasStaticAttribute(string $attributeName, string $className[, string $message = '' ]) : mixed
Parameters
$attributeName : string
$className : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertContains()

Asserts that a haystack contains a needle.

public static 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
since

Method available since Release 2.1.0

Return values
mixed

assertContainsOnly()

Asserts that a haystack contains only values of a given type.

public static assertContainsOnly(string $type, mixed $haystack[, bool $isNativeType = null ][, string $message = '' ]) : mixed
Parameters
$type : string
$haystack : mixed
$isNativeType : bool = null
$message : string = ''
Tags
since

Method available since Release 3.1.4

Return values
mixed

assertContainsOnlyInstancesOf()

Asserts that a haystack contains only instances of a given classname

public static assertContainsOnlyInstancesOf(string $classname, array<string|int, mixed>|Traversable $haystack[, string $message = '' ]) : mixed
Parameters
$classname : string
$haystack : array<string|int, mixed>|Traversable
$message : string = ''
Return values
mixed

assertCount()

Asserts the number of elements of an array, Countable or Traversable.

public static assertCount(int $expectedCount, mixed $haystack[, string $message = '' ]) : mixed
Parameters
$expectedCount : int
$haystack : mixed
$message : string = ''
Return values
mixed

assertEmpty()

Asserts that a variable is empty.

public static assertEmpty(mixed $actual[, string $message = '' ]) : mixed
Parameters
$actual : mixed
$message : string = ''
Tags
throws
PHPUnit_Framework_AssertionFailedError
Return values
mixed

assertEquals()

Asserts that two variables are equal.

public static 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
Return values
mixed

assertEqualXMLStructure()

Asserts that a hierarchy of DOMElements matches.

public static assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement[, bool $checkAttributes = false ][, string $message = '' ]) : mixed
Parameters
$expectedElement : DOMElement
$actualElement : DOMElement
$checkAttributes : bool = false
$message : string = ''
Tags
since

Method available since Release 3.3.0

Return values
mixed

assertFalse()

Asserts that a condition is false.

public static assertFalse(bool $condition[, string $message = '' ]) : mixed
Parameters
$condition : bool
$message : string = ''
Tags
throws
PHPUnit_Framework_AssertionFailedError
Return values
mixed

assertFileEquals()

Asserts that the contents of one file is equal to the contents of another file.

public static 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
since

Method available since Release 3.2.14

Return values
mixed

assertFileExists()

Asserts that a file exists.

public static assertFileExists(string $filename[, string $message = '' ]) : mixed
Parameters
$filename : string
$message : string = ''
Tags
since

Method available since Release 3.0.0

Return values
mixed

assertFileNotEquals()

Asserts that the contents of one file is not equal to the contents of another file.

public static 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
since

Method available since Release 3.2.14

Return values
mixed

assertFileNotExists()

Asserts that a file does not exist.

public static assertFileNotExists(string $filename[, string $message = '' ]) : mixed
Parameters
$filename : string
$message : string = ''
Tags
since

Method available since Release 3.0.0

Return values
mixed

assertGreaterThan()

Asserts that a value is greater than another value.

public static assertGreaterThan(mixed $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertGreaterThanOrEqual()

Asserts that a value is greater than or equal to another value.

public static assertGreaterThanOrEqual(mixed $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertInstanceOf()

Asserts that a variable is of a given type.

public static assertInstanceOf(string $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
$expected : string
$actual : mixed
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertInternalType()

Asserts that a variable is of a given type.

public static assertInternalType(string $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
$expected : string
$actual : mixed
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertJson()

Asserts that a string is a valid JSON string.

public static assertJson(string $actualJson[, string $message = '' ]) : mixed
Parameters
$actualJson : string
$message : string = ''
Tags
since

Method available since Release 3.7.20

Return values
mixed

assertJsonFileEqualsJsonFile()

Asserts that two JSON files are equal.

public static assertJsonFileEqualsJsonFile(string $expectedFile, string $actualFile[, string $message = '' ]) : mixed
Parameters
$expectedFile : string
$actualFile : string
$message : string = ''
Return values
mixed

assertJsonFileNotEqualsJsonFile()

Asserts that two JSON files are not equal.

public static assertJsonFileNotEqualsJsonFile(string $expectedFile, string $actualFile[, string $message = '' ]) : mixed
Parameters
$expectedFile : string
$actualFile : string
$message : string = ''
Return values
mixed

assertJsonStringEqualsJsonFile()

Asserts that the generated JSON encoded object and the content of the given file are equal.

public static assertJsonStringEqualsJsonFile(string $expectedFile, string $actualJson[, string $message = '' ]) : mixed
Parameters
$expectedFile : string
$actualJson : string
$message : string = ''
Return values
mixed

assertJsonStringEqualsJsonString()

Asserts that two given JSON encoded objects or arrays are equal.

public static assertJsonStringEqualsJsonString(string $expectedJson, string $actualJson[, string $message = '' ]) : mixed
Parameters
$expectedJson : string
$actualJson : string
$message : string = ''
Return values
mixed

assertJsonStringNotEqualsJsonFile()

Asserts that the generated JSON encoded object and the content of the given file are not equal.

public static assertJsonStringNotEqualsJsonFile(string $expectedFile, string $actualJson[, string $message = '' ]) : mixed
Parameters
$expectedFile : string
$actualJson : string
$message : string = ''
Return values
mixed

assertJsonStringNotEqualsJsonString()

Asserts that two given JSON encoded objects or arrays are not equal.

public static assertJsonStringNotEqualsJsonString(string $expectedJson, string $actualJson[, string $message = '' ]) : mixed
Parameters
$expectedJson : string
$actualJson : string
$message : string = ''
Return values
mixed

assertLessThan()

Asserts that a value is smaller than another value.

public static assertLessThan(mixed $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertLessThanOrEqual()

Asserts that a value is smaller than or equal to another value.

public static assertLessThanOrEqual(mixed $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
$expected : mixed
$actual : mixed
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertNotContains()

Asserts that a haystack does not contain a needle.

public static 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
since

Method available since Release 2.1.0

Return values
mixed

assertNotContainsOnly()

Asserts that a haystack does not contain only values of a given type.

public static assertNotContainsOnly(string $type, mixed $haystack[, bool $isNativeType = null ][, string $message = '' ]) : mixed
Parameters
$type : string
$haystack : mixed
$isNativeType : bool = null
$message : string = ''
Tags
since

Method available since Release 3.1.4

Return values
mixed

assertNotCount()

Asserts the number of elements of an array, Countable or Traversable.

public static assertNotCount(int $expectedCount, mixed $haystack[, string $message = '' ]) : mixed
Parameters
$expectedCount : int
$haystack : mixed
$message : string = ''
Return values
mixed

assertNotEmpty()

Asserts that a variable is not empty.

public static assertNotEmpty(mixed $actual[, string $message = '' ]) : mixed
Parameters
$actual : mixed
$message : string = ''
Tags
throws
PHPUnit_Framework_AssertionFailedError
Return values
mixed

assertNotEquals()

Asserts that two variables are not equal.

public static 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
since

Method available since Release 2.3.0

Return values
mixed

assertNotFalse()

Asserts that a condition is not false.

public static assertNotFalse(bool $condition[, string $message = '' ]) : mixed
Parameters
$condition : bool
$message : string = ''
Tags
throws
PHPUnit_Framework_AssertionFailedError
Return values
mixed

assertNotInstanceOf()

Asserts that a variable is not of a given type.

public static assertNotInstanceOf(string $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
$expected : string
$actual : mixed
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertNotInternalType()

Asserts that a variable is not of a given type.

public static assertNotInternalType(string $expected, mixed $actual[, string $message = '' ]) : mixed
Parameters
$expected : string
$actual : mixed
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertNotNull()

Asserts that a variable is not null.

public static assertNotNull(mixed $actual[, string $message = '' ]) : mixed
Parameters
$actual : mixed
$message : string = ''
Return values
mixed

assertNotRegExp()

Asserts that a string does not match a given regular expression.

public static assertNotRegExp(string $pattern, string $string[, string $message = '' ]) : mixed
Parameters
$pattern : string
$string : string
$message : string = ''
Tags
since

Method available since Release 2.1.0

Return values
mixed

assertNotSame()

Asserts that two variables do not have the same type and value.

public static 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 = ''
Return values
mixed

assertNotSameSize()

Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same.

public static 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 = ''
Return values
mixed

assertNotTag()

This assertion is the exact opposite of assertTag().

public static 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
since

Method available since Release 3.3.0

deprecated
codeCoverageIgnore
Return values
mixed

assertNotTrue()

Asserts that a condition is not true.

public static assertNotTrue(bool $condition[, string $message = '' ]) : mixed
Parameters
$condition : bool
$message : string = ''
Tags
throws
PHPUnit_Framework_AssertionFailedError
Return values
mixed

assertNull()

Asserts that a variable is null.

public static assertNull(mixed $actual[, string $message = '' ]) : mixed
Parameters
$actual : mixed
$message : string = ''
Return values
mixed

assertObjectHasAttribute()

Asserts that an object has a specified attribute.

public static assertObjectHasAttribute(string $attributeName, object $object[, string $message = '' ]) : mixed
Parameters
$attributeName : string
$object : object
$message : string = ''
Tags
since

Method available since Release 3.0.0

Return values
mixed

assertObjectNotHasAttribute()

Asserts that an object does not have a specified attribute.

public static assertObjectNotHasAttribute(string $attributeName, object $object[, string $message = '' ]) : mixed
Parameters
$attributeName : string
$object : object
$message : string = ''
Tags
since

Method available since Release 3.0.0

Return values
mixed

assertRegExp()

Asserts that a string matches a given regular expression.

public static assertRegExp(string $pattern, string $string[, string $message = '' ]) : mixed
Parameters
$pattern : string
$string : string
$message : string = ''
Return values
mixed

assertSame()

Asserts that two variables have the same type and value.

public static 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 = ''
Return values
mixed

assertSameSize()

Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same.

public static 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 = ''
Return values
mixed

assertSelectCount()

Assert the presence, absence, or count of elements in a document matching the CSS $selector, regardless of the contents of those elements.

public static assertSelectCount(array<string|int, mixed> $selector, int|bool|array<string|int, mixed> $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|bool|array<string|int, mixed>
$actual : mixed
$message : string = ''
$isHtml : bool = true
Tags
since

Method available since Release 3.3.0

deprecated
codeCoverageIgnore
Return values
mixed

assertSelectEquals()

assertSelectEquals("#binder .name", "Chuck", true, $xml); // any? assertSelectEquals("#binder .name", "Chuck", false, $xml); // none?

public static assertSelectEquals(array<string|int, mixed> $selector, string $content, int|bool|array<string|int, mixed> $count, mixed $actual[, string $message = '' ][, bool $isHtml = true ]) : mixed
Parameters
$selector : array<string|int, mixed>
$content : string
$count : int|bool|array<string|int, mixed>
$actual : mixed
$message : string = ''
$isHtml : bool = true
Tags
since

Method available since Release 3.3.0

deprecated
codeCoverageIgnore
Return values
mixed

assertSelectRegExp()

assertSelectRegExp("#binder .name", "/Mike|Derek/", true, $xml); // any? assertSelectRegExp("#binder .name", "/Mike|Derek/", 3, $xml); // 3?

public static assertSelectRegExp(array<string|int, mixed> $selector, string $pattern, int|bool|array<string|int, mixed> $count, mixed $actual[, string $message = '' ][, bool $isHtml = true ]) : mixed
Parameters
$selector : array<string|int, mixed>
$pattern : string
$count : int|bool|array<string|int, mixed>
$actual : mixed
$message : string = ''
$isHtml : bool = true
Tags
since

Method available since Release 3.3.0

deprecated
codeCoverageIgnore
Return values
mixed

assertStringEndsNotWith()

Asserts that a string ends not with a given suffix.

public static assertStringEndsNotWith(string $suffix, string $string[, string $message = '' ]) : mixed
Parameters
$suffix : string
$string : string
$message : string = ''
Tags
since

Method available since Release 3.4.0

Return values
mixed

assertStringEndsWith()

Asserts that a string ends with a given suffix.

public static assertStringEndsWith(string $suffix, string $string[, string $message = '' ]) : mixed
Parameters
$suffix : string
$string : string
$message : string = ''
Tags
since

Method available since Release 3.4.0

Return values
mixed

assertStringEqualsFile()

Asserts that the contents of a string is equal to the contents of a file.

public static 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
since

Method available since Release 3.3.0

Return values
mixed

assertStringMatchesFormat()

Asserts that a string matches a given format string.

public static assertStringMatchesFormat(string $format, string $string[, string $message = '' ]) : mixed
Parameters
$format : string
$string : string
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertStringMatchesFormatFile()

Asserts that a string matches a given format file.

public static assertStringMatchesFormatFile(string $formatFile, string $string[, string $message = '' ]) : mixed
Parameters
$formatFile : string
$string : string
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertStringNotEqualsFile()

Asserts that the contents of a string is not equal to the contents of a file.

public static 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
since

Method available since Release 3.3.0

Return values
mixed

assertStringNotMatchesFormat()

Asserts that a string does not match a given format string.

public static assertStringNotMatchesFormat(string $format, string $string[, string $message = '' ]) : mixed
Parameters
$format : string
$string : string
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertStringNotMatchesFormatFile()

Asserts that a string does not match a given format string.

public static assertStringNotMatchesFormatFile(string $formatFile, string $string[, string $message = '' ]) : mixed
Parameters
$formatFile : string
$string : string
$message : string = ''
Tags
since

Method available since Release 3.5.0

Return values
mixed

assertStringStartsNotWith()

Asserts that a string starts not with a given prefix.

public static assertStringStartsNotWith(string $prefix, string $string[, string $message = '' ]) : mixed
Parameters
$prefix : string
$string : string
$message : string = ''
Tags
since

Method available since Release 3.4.0

Return values
mixed

assertStringStartsWith()

Asserts that a string starts with a given prefix.

public static assertStringStartsWith(string $prefix, string $string[, string $message = '' ]) : mixed
Parameters
$prefix : string
$string : string
$message : string = ''
Tags
since

Method available since Release 3.4.0

Return values
mixed

assertTag()

Evaluate an HTML or XML string and assert its structure and/or contents.

public static 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
since

Method available since Release 3.3.0

deprecated
codeCoverageIgnore
Return values
mixed

assertThat()

Evaluates a PHPUnit_Framework_Constraint matcher object.

public static assertThat(mixed $value, PHPUnit_Framework_Constraint $constraint[, string $message = '' ]) : mixed
Parameters
$value : mixed
$constraint : PHPUnit_Framework_Constraint
$message : string = ''
Tags
since

Method available since Release 3.0.0

Return values
mixed

assertTrue()

Asserts that a condition is true.

public static assertTrue(bool $condition[, string $message = '' ]) : mixed
Parameters
$condition : bool
$message : string = ''
Tags
throws
PHPUnit_Framework_AssertionFailedError
Return values
mixed

assertXmlFileEqualsXmlFile()

Asserts that two XML files are equal.

public static assertXmlFileEqualsXmlFile(string $expectedFile, string $actualFile[, string $message = '' ]) : mixed
Parameters
$expectedFile : string
$actualFile : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertXmlFileNotEqualsXmlFile()

Asserts that two XML files are not equal.

public static assertXmlFileNotEqualsXmlFile(string $expectedFile, string $actualFile[, string $message = '' ]) : mixed
Parameters
$expectedFile : string
$actualFile : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertXmlStringEqualsXmlFile()

Asserts that two XML documents are equal.

public static assertXmlStringEqualsXmlFile(string $expectedFile, string $actualXml[, string $message = '' ]) : mixed
Parameters
$expectedFile : string
$actualXml : string
$message : string = ''
Tags
since

Method available since Release 3.3.0

Return values
mixed

assertXmlStringEqualsXmlString()

Asserts that two XML documents are equal.

public static assertXmlStringEqualsXmlString(string $expectedXml, string $actualXml[, string $message = '' ]) : mixed
Parameters
$expectedXml : string
$actualXml : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

assertXmlStringNotEqualsXmlFile()

Asserts that two XML documents are not equal.

public static assertXmlStringNotEqualsXmlFile(string $expectedFile, string $actualXml[, string $message = '' ]) : mixed
Parameters
$expectedFile : string
$actualXml : string
$message : string = ''
Tags
since

Method available since Release 3.3.0

Return values
mixed

assertXmlStringNotEqualsXmlString()

Asserts that two XML documents are not equal.

public static assertXmlStringNotEqualsXmlString(string $expectedXml, string $actualXml[, string $message = '' ]) : mixed
Parameters
$expectedXml : string
$actualXml : string
$message : string = ''
Tags
since

Method available since Release 3.1.0

Return values
mixed

attributeEqualTo()

Returns a PHPUnit_Framework_Constraint_IsEqual matcher object that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher object.

public static 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
since

Method available since Release 3.1.0

Return values
PHPUnit_Framework_Constraint_Attribute

contains()

Returns a PHPUnit_Framework_Constraint_TraversableContains matcher object.

public static contains(mixed $value[, bool $checkForObjectIdentity = true ][, bool $checkForNonObjectIdentity = false ]) : PHPUnit_Framework_Constraint_TraversableContains
Parameters
$value : mixed
$checkForObjectIdentity : bool = true
$checkForNonObjectIdentity : bool = false
Tags
since

Method available since Release 3.0.0

Return values
PHPUnit_Framework_Constraint_TraversableContains

count()

Counts the number of test cases executed by run(TestResult result).

public count() : int
Return values
int

equalProvider()

public equalProvider() : mixed
Return values
mixed

equalTo()

Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.

public static 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
since

Method available since Release 3.0.0

Return values
PHPUnit_Framework_Constraint_IsEqual

expectOutputRegex()

public expectOutputRegex(string $expectedRegex) : mixed
Parameters
$expectedRegex : string
Tags
since

Method available since Release 3.6.0

throws
PHPUnit_Framework_Exception
Return values
mixed

expectOutputString()

public expectOutputString(string $expectedString) : mixed
Parameters
$expectedString : string
Tags
since

Method available since Release 3.6.0

Return values
mixed

getActualOutput()

public getActualOutput() : string
Tags
since

Method available since Release 3.6.0

Return values
string

getAnnotations()

Returns the annotations for this test.

public getAnnotations() : array<string|int, mixed>
Tags
since

Method available since Release 3.4.0

Return values
array<string|int, mixed>

getCount()

Return the current assertion count.

public static getCount() : int
Tags
since

Method available since Release 3.3.3

Return values
int

getExpectedException()

public getExpectedException() : string
Tags
since

Method available since Release 3.2.0

Return values
string

getMock()

Returns a mock object for the specified class.

public getMock(string $originalClassName[, array<string|int, mixed>|null $methods = array() ][, array<string|int, mixed> $arguments = array() ][, string $mockClassName = '' ][, bool $callOriginalConstructor = true ][, bool $callOriginalClone = true ][, bool $callAutoload = true ][, bool $cloneArguments = false ][, bool $callOriginalMethods = false ][, object $proxyTarget = null ]) : PHPUnit_Framework_MockObject_MockObject
Parameters
$originalClassName : string

Name of the class to mock.

$methods : array<string|int, mixed>|null = array()

When provided, only methods whose names are in the array are replaced with a configurable test double. The behavior of the other methods is not changed. Providing null means that no methods will be replaced.

$arguments : array<string|int, mixed> = array()

Parameters to pass to the original class' constructor.

$mockClassName : string = ''

Class name for the generated test double class.

$callOriginalConstructor : bool = true

Can be used to disable the call to the original class' constructor.

$callOriginalClone : bool = true

Can be used to disable the call to the original class' clone constructor.

$callAutoload : bool = true

Can be used to disable __autoload() during the generation of the test double class.

$cloneArguments : bool = false
$callOriginalMethods : bool = false
$proxyTarget : object = null
Tags
throws
PHPUnit_Framework_Exception
since

Method available since Release 3.0.0

Return values
PHPUnit_Framework_MockObject_MockObject

getMockForAbstractClass()

Returns a mock object for the specified abstract class with all abstract methods of the class mocked. Concrete methods are not mocked by default.

public getMockForAbstractClass(string $originalClassName[, array<string|int, mixed> $arguments = array() ][, string $mockClassName = '' ][, bool $callOriginalConstructor = true ][, bool $callOriginalClone = true ][, bool $callAutoload = true ][, array<string|int, mixed> $mockedMethods = array() ][, bool $cloneArguments = false ]) : PHPUnit_Framework_MockObject_MockObject

To mock concrete methods, use the 7th parameter ($mockedMethods).

Parameters
$originalClassName : string
$arguments : array<string|int, mixed> = array()
$mockClassName : string = ''
$callOriginalConstructor : bool = true
$callOriginalClone : bool = true
$callAutoload : bool = true
$mockedMethods : array<string|int, mixed> = array()
$cloneArguments : bool = false
Tags
since

Method available since Release 3.4.0

throws
PHPUnit_Framework_Exception
Return values
PHPUnit_Framework_MockObject_MockObject

getMockForTrait()

Returns a mock object for the specified trait with all abstract methods of the trait mocked. Concrete methods to mock can be specified with the `$mockedMethods` parameter.

public getMockForTrait(string $traitName[, array<string|int, mixed> $arguments = array() ][, string $mockClassName = '' ][, bool $callOriginalConstructor = true ][, bool $callOriginalClone = true ][, bool $callAutoload = true ][, array<string|int, mixed> $mockedMethods = array() ][, bool $cloneArguments = false ]) : PHPUnit_Framework_MockObject_MockObject
Parameters
$traitName : string
$arguments : array<string|int, mixed> = array()
$mockClassName : string = ''
$callOriginalConstructor : bool = true
$callOriginalClone : bool = true
$callAutoload : bool = true
$mockedMethods : array<string|int, mixed> = array()
$cloneArguments : bool = false
Tags
since

Method available since Release 4.0.0

throws
PHPUnit_Framework_Exception
Return values
PHPUnit_Framework_MockObject_MockObject

getName()

Gets the name of a TestCase.

public getName([bool $withDataSet = true ]) : string
Parameters
$withDataSet : bool = true
Return values
string

getNumAssertions()

Returns the number of assertions performed by this test.

public getNumAssertions() : int
Tags
since

Method available since Release 3.3.0

Return values
int

getObjectAttribute()

Returns the value of an object's attribute.

public static getObjectAttribute(object $object, string $attributeName) : mixed

This also works for attributes that are declared protected or private.

Parameters
$object : object
$attributeName : string
Tags
throws
PHPUnit_Framework_Exception
since

Method available since Release 4.0.0

Return values
mixed

getResult()

public getResult() : mixed
Tags
since

Method available since Release 3.4.0

Return values
mixed

getSize()

Returns the size of the test.

public getSize() : int
Tags
since

Method available since Release 3.6.0

Return values
int

getStaticAttribute()

Returns the value of a static attribute.

public static getStaticAttribute(string $className, string $attributeName) : mixed

This also works for attributes that are declared protected or private.

Parameters
$className : string
$attributeName : string
Tags
throws
PHPUnit_Framework_Exception
since

Method available since Release 4.0.0

Return values
mixed

getStatus()

Returns the status of this test.

public getStatus() : int
Tags
since

Method available since Release 3.1.0

Return values
int

getStatusMessage()

Returns the status message of this test.

public getStatusMessage() : string
Tags
since

Method available since Release 3.3.0

Return values
string

greaterThanOrEqual()

Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_GreaterThan matcher object.

public static greaterThanOrEqual(mixed $value) : PHPUnit_Framework_Constraint_Or
Parameters
$value : mixed
Tags
since

Method available since Release 3.1.0

Return values
PHPUnit_Framework_Constraint_Or

hasDependencies()

Returns true if the tests has dependencies

public hasDependencies() : bool
Tags
since

Method available since Release 4.0.0

Return values
bool

hasExpectationOnOutput()

public hasExpectationOnOutput() : bool
Tags
since

Method available since Release 4.3.3

Return values
bool

hasFailed()

Returns whether or not this test has failed.

public hasFailed() : bool
Tags
since

Method available since Release 3.0.0

Return values
bool

hasOutput()

public hasOutput() : bool
Tags
since

Method available since Release 3.6.0

Return values
bool

hasPerformedExpectationsOnOutput()

public hasPerformedExpectationsOnOutput() : bool
Tags
since

Method available since Release 3.6.5

deprecated
Return values
bool

isInIsolation()

public isInIsolation() : bool
Tags
since

Method available since Release 4.3.0

Return values
bool

lessThanOrEqual()

Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps a PHPUnit_Framework_Constraint_IsEqual and a PHPUnit_Framework_Constraint_LessThan matcher object.

public static lessThanOrEqual(mixed $value) : PHPUnit_Framework_Constraint_Or
Parameters
$value : mixed
Tags
since

Method available since Release 3.1.0

Return values
PHPUnit_Framework_Constraint_Or

markTestIncomplete()

Mark the test as incomplete.

public static markTestIncomplete([string $message = '' ]) : mixed
Parameters
$message : string = ''
Tags
throws
PHPUnit_Framework_IncompleteTestError
since

Method available since Release 3.0.0

Return values
mixed

markTestSkipped()

Mark the test as skipped.

public static markTestSkipped([string $message = '' ]) : mixed
Parameters
$message : string = ''
Tags
throws
PHPUnit_Framework_SkippedTestError
since

Method available since Release 3.0.0

Return values
mixed

notEqualProvider()

public notEqualProvider() : mixed
Return values
mixed

notSameProvider()

public notSameProvider() : mixed
Return values
mixed

readAttribute()

Returns the value of an attribute of a class or an object.

public static readAttribute(mixed $classOrObject, string $attributeName) : mixed

This also works for attributes that are declared protected or private.

Parameters
$classOrObject : mixed
$attributeName : string
Tags
throws
PHPUnit_Framework_Exception
Return values
mixed

resetCount()

Reset the assertion counter.

public static resetCount() : mixed
Tags
since

Method available since Release 3.3.3

Return values
mixed

runBare()

Runs the bare test sequence.

public runBare() : mixed
Return values
mixed

sameProvider()

public sameProvider() : mixed
Return values
mixed

setBackupGlobals()

Calling this method in setUp() has no effect!

public setBackupGlobals(bool $backupGlobals) : mixed
Parameters
$backupGlobals : bool
Tags
since

Method available since Release 3.3.0

Return values
mixed

setBackupStaticAttributes()

Calling this method in setUp() has no effect!

public setBackupStaticAttributes(bool $backupStaticAttributes) : mixed
Parameters
$backupStaticAttributes : bool
Tags
since

Method available since Release 3.4.0

Return values
mixed

setDependencies()

Sets the dependencies of a TestCase.

public setDependencies(array<string|int, mixed> $dependencies) : mixed
Parameters
$dependencies : array<string|int, mixed>
Tags
since

Method available since Release 3.4.0

Return values
mixed

setDependencyInput()

Sets

public setDependencyInput(array<string|int, mixed> $dependencyInput) : mixed
Parameters
$dependencyInput : array<string|int, mixed>
Tags
since

Method available since Release 3.4.0

Return values
mixed

setDisallowChangesToGlobalState()

public setDisallowChangesToGlobalState(bool $disallowChangesToGlobalState) : mixed
Parameters
$disallowChangesToGlobalState : bool
Tags
since

Method available since Release 4.6.0

Return values
mixed

setExpectedException()

public setExpectedException(mixed $exceptionName[, string $exceptionMessage = '' ][, int $exceptionCode = null ]) : mixed
Parameters
$exceptionName : mixed
$exceptionMessage : string = ''
$exceptionCode : int = null
Tags
since

Method available since Release 3.2.0

Return values
mixed

setExpectedExceptionRegExp()

public setExpectedExceptionRegExp(mixed $exceptionName[, string $exceptionMessageRegExp = '' ][, int $exceptionCode = null ]) : mixed
Parameters
$exceptionName : mixed
$exceptionMessageRegExp : string = ''
$exceptionCode : int = null
Tags
since

Method available since Release 4.3.0

Return values
mixed

setInIsolation()

public setInIsolation(bool $inIsolation) : mixed
Parameters
$inIsolation : bool
Tags
throws
PHPUnit_Framework_Exception
since

Method available since Release 3.4.0

Return values
mixed

setName()

Sets the name of a TestCase.

public setName(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

setOutputCallback()

public setOutputCallback(callable $callback) : mixed
Parameters
$callback : callable
Tags
throws
PHPUnit_Framework_Exception
since

Method available since Release 3.6.0

Return values
mixed

setPreserveGlobalState()

public setPreserveGlobalState(bool $preserveGlobalState) : mixed
Parameters
$preserveGlobalState : bool
Tags
throws
PHPUnit_Framework_Exception
since

Method available since Release 3.4.0

Return values
mixed

setResult()

public setResult(mixed $result) : mixed
Parameters
$result : mixed
Tags
since

Method available since Release 3.4.0

Return values
mixed

setRunTestInSeparateProcess()

public setRunTestInSeparateProcess(bool $runTestInSeparateProcess) : mixed
Parameters
$runTestInSeparateProcess : bool
Tags
throws
PHPUnit_Framework_Exception
since

Method available since Release 3.4.0

Return values
mixed

setUpBeforeClass()

This method is called before the first test of this test class is run.

public static setUpBeforeClass() : mixed
Tags
since

Method available since Release 3.4.0

Return values
mixed

setUseErrorHandler()

public setUseErrorHandler(bool $useErrorHandler) : mixed
Parameters
$useErrorHandler : bool
Tags
since

Method available since Release 3.4.0

Return values
mixed

tearDownAfterClass()

This method is called after the last test of this test class is run.

public static tearDownAfterClass() : mixed
Tags
since

Method available since Release 3.4.0

Return values
mixed

testAssertArrayContainsNonObject()

public testAssertArrayContainsNonObject() : mixed
Tags
covers
Return values
mixed

testAssertArrayContainsObject()

public testAssertArrayContainsObject() : mixed
Tags
covers
Return values
mixed

testAssertArrayContainsOnlyIntegers()

public testAssertArrayContainsOnlyIntegers() : mixed
Tags
covers
Return values
mixed

testAssertArrayContainsOnlyStdClass()

public testAssertArrayContainsOnlyStdClass() : mixed
Tags
covers
Return values
mixed

testAssertArrayContainsString()

public testAssertArrayContainsString() : mixed
Tags
covers
Return values
mixed

testAssertArrayHasIntegerKey()

public testAssertArrayHasIntegerKey() : mixed
Tags
covers
Return values
mixed

testAssertArrayHasKeyAcceptsArrayAccessValue()

public testAssertArrayHasKeyAcceptsArrayAccessValue() : mixed
Tags
covers
Return values
mixed

testAssertArrayHasKeyAcceptsArrayObjectValue()

public testAssertArrayHasKeyAcceptsArrayObjectValue() : mixed
Tags
covers
Return values
mixed

testAssertArrayHasKeyProperlyFailsWithArrayAccessValue()

public testAssertArrayHasKeyProperlyFailsWithArrayAccessValue() : mixed
Tags
covers
expectedException

PHPUnit_Framework_AssertionFailedError

Return values
mixed

testAssertArrayHasKeyProperlyFailsWithArrayObjectValue()

public testAssertArrayHasKeyProperlyFailsWithArrayObjectValue() : mixed
Tags
covers
expectedException

PHPUnit_Framework_AssertionFailedError

Return values
mixed

testAssertArrayHasKeyThrowsExceptionForInvalidFirstArgument()

public testAssertArrayHasKeyThrowsExceptionForInvalidFirstArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertArrayHasKeyThrowsExceptionForInvalidSecondArgument()

public testAssertArrayHasKeyThrowsExceptionForInvalidSecondArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertArrayHasStringKey()

public testAssertArrayHasStringKey() : mixed
Tags
covers
Return values
mixed

testAssertArrayNotContainsNonObject()

public testAssertArrayNotContainsNonObject() : mixed
Tags
covers
Return values
mixed

testAssertArrayNotContainsObject()

public testAssertArrayNotContainsObject() : mixed
Tags
covers
Return values
mixed

testAssertArrayNotContainsOnlyIntegers()

public testAssertArrayNotContainsOnlyIntegers() : mixed
Tags
covers
Return values
mixed

testAssertArrayNotContainsOnlyStdClass()

public testAssertArrayNotContainsOnlyStdClass() : mixed
Tags
covers
Return values
mixed

testAssertArrayNotContainsString()

public testAssertArrayNotContainsString() : mixed
Tags
covers
Return values
mixed

testAssertArrayNotHasIntegerKey()

public testAssertArrayNotHasIntegerKey() : mixed
Tags
covers
Return values
mixed

testAssertArrayNotHasKeyAcceptsArrayAccessValue()

public testAssertArrayNotHasKeyAcceptsArrayAccessValue() : mixed
Tags
covers
Return values
mixed

testAssertArrayNotHasKeyPropertlyFailsWithArrayAccessValue()

public testAssertArrayNotHasKeyPropertlyFailsWithArrayAccessValue() : mixed
Tags
covers
expectedException

PHPUnit_Framework_AssertionFailedError

Return values
mixed

testAssertArrayNotHasKeyThrowsExceptionForInvalidFirstArgument()

public testAssertArrayNotHasKeyThrowsExceptionForInvalidFirstArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertArrayNotHasKeyThrowsExceptionForInvalidSecondArgument()

public testAssertArrayNotHasKeyThrowsExceptionForInvalidSecondArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertArrayNotHasStringKey()

public testAssertArrayNotHasStringKey() : mixed
Tags
covers
Return values
mixed

testAssertArraySubset()

public testAssertArraySubset() : mixed
Tags
covers
covers
Return values
mixed

testAssertArraySubsetRaisesExceptionForInvalidArguments()

public testAssertArraySubsetRaisesExceptionForInvalidArguments(mixed $partial, mixed $subject) : mixed
Parameters
$partial : mixed
$subject : mixed
Tags
covers
covers
expectedException

PHPUnit_Framework_Exception

expectedExceptionMessage

array or ArrayAccess

dataProvider

assertArraySubsetInvalidArgumentProvider

Return values
mixed

testAssertArraySubsetWithDeepNestedArrays()

public testAssertArraySubsetWithDeepNestedArrays() : mixed
Tags
covers
covers
Return values
mixed

testAssertArraySubsetWithNoStrictCheckAndObjects()

public testAssertArraySubsetWithNoStrictCheckAndObjects() : mixed
Tags
covers
covers
Return values
mixed

testAssertArraySubsetWithStrictCheckAndObjects()

public testAssertArraySubsetWithStrictCheckAndObjects() : mixed
Tags
covers
covers
Return values
mixed

testAssertAttributeContainsNonObject()

public testAssertAttributeContainsNonObject() : mixed
Tags
covers
Return values
mixed

testAssertAttributeCount()

public testAssertAttributeCount() : mixed
Tags
covers
Return values
mixed

testAssertAttributeEmpty()

public testAssertAttributeEmpty() : mixed
Tags
covers
Return values
mixed

testAssertAttributeInstanceOf()

public testAssertAttributeInstanceOf() : mixed
Tags
covers
Return values
mixed

testAssertAttributeInternalType()

public testAssertAttributeInternalType() : mixed
Tags
covers
Return values
mixed

testAssertAttributeNotContainsNonObject()

public testAssertAttributeNotContainsNonObject() : mixed
Tags
covers
Return values
mixed

testAssertAttributeNotCount()

public testAssertAttributeNotCount() : mixed
Tags
covers
Return values
mixed

testAssertAttributeNotEmpty()

public testAssertAttributeNotEmpty() : mixed
Tags
covers
Return values
mixed

testAssertAttributeNotInstanceOf()

public testAssertAttributeNotInstanceOf() : mixed
Tags
covers
Return values
mixed

testAssertAttributeNotInternalType()

public testAssertAttributeNotInternalType() : mixed
Tags
covers
Return values
mixed

testAssertClassHasAttributeThrowsException()

public testAssertClassHasAttributeThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassHasAttributeThrowsException2()

public testAssertClassHasAttributeThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassHasAttributeThrowsExceptionIfAttributeNameIsNotValid()

public testAssertClassHasAttributeThrowsExceptionIfAttributeNameIsNotValid() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassHasStaticAttributeThrowsException()

public testAssertClassHasStaticAttributeThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassHasStaticAttributeThrowsException2()

public testAssertClassHasStaticAttributeThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassHasStaticAttributeThrowsExceptionIfAttributeNameIsNotValid()

public testAssertClassHasStaticAttributeThrowsExceptionIfAttributeNameIsNotValid() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassNotHasAttributeThrowsException()

public testAssertClassNotHasAttributeThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassNotHasAttributeThrowsException2()

public testAssertClassNotHasAttributeThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassNotHasAttributeThrowsExceptionIfAttributeNameIsNotValid()

public testAssertClassNotHasAttributeThrowsExceptionIfAttributeNameIsNotValid() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassNotHasStaticAttributeThrowsException()

public testAssertClassNotHasStaticAttributeThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassNotHasStaticAttributeThrowsException2()

public testAssertClassNotHasStaticAttributeThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertClassNotHasStaticAttributeThrowsExceptionIfAttributeNameIsNotValid()

public testAssertClassNotHasStaticAttributeThrowsExceptionIfAttributeNameIsNotValid() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertContainsOnlyInstancesOf()

public testAssertContainsOnlyInstancesOf() : mixed
Tags
covers
Return values
mixed

testAssertContainsOnlyInstancesOfThrowsException()

public testAssertContainsOnlyInstancesOfThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertContainsOnlyThrowsException()

public testAssertContainsOnlyThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertContainsThrowsException()

public testAssertContainsThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertCount()

public testAssertCount() : mixed
Tags
covers
Return values
mixed

testAssertCountThrowsExceptionIfElementIsNotCountable()

public testAssertCountThrowsExceptionIfElementIsNotCountable() : mixed
Tags
covers
Return values
mixed

testAssertCountThrowsExceptionIfExpectedCountIsNoInteger()

public testAssertCountThrowsExceptionIfExpectedCountIsNoInteger() : mixed
Tags
covers
Return values
mixed

testAssertCountTraversable()

public testAssertCountTraversable() : mixed
Tags
covers
Return values
mixed

testAssertEmpty()

public testAssertEmpty() : mixed
Tags
covers
Return values
mixed

testAssertEqualsFails()

public testAssertEqualsFails(mixed $a, mixed $b[, mixed $delta = 0.0 ][, mixed $canonicalize = false ][, mixed $ignoreCase = false ]) : mixed
Parameters
$a : mixed
$b : mixed
$delta : mixed = 0.0
$canonicalize : mixed = false
$ignoreCase : mixed = false
Tags
covers
dataProvider

notEqualProvider

Return values
mixed

testAssertEqualsSucceeds()

public testAssertEqualsSucceeds(mixed $a, mixed $b[, mixed $delta = 0.0 ][, mixed $canonicalize = false ][, mixed $ignoreCase = false ]) : mixed
Parameters
$a : mixed
$b : mixed
$delta : mixed = 0.0
$canonicalize : mixed = false
$ignoreCase : mixed = false
Tags
covers
dataProvider

equalProvider

Return values
mixed

testAssertFalse()

public testAssertFalse() : mixed
Tags
covers
Return values
mixed

testAssertFileEquals()

public testAssertFileEquals() : mixed
Tags
covers
Return values
mixed

testAssertFileExists()

public testAssertFileExists() : mixed
Tags
covers
Return values
mixed

testAssertFileExistsThrowsException()

public testAssertFileExistsThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertFileNotEquals()

public testAssertFileNotEquals() : mixed
Tags
covers
Return values
mixed

testAssertFileNotExists()

public testAssertFileNotExists() : mixed
Tags
covers
Return values
mixed

testAssertFileNotExistsThrowsException()

public testAssertFileNotExistsThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertInstanceOf()

public testAssertInstanceOf() : mixed
Tags
covers
Return values
mixed

testAssertInstanceOfThrowsExceptionForInvalidArgument()

public testAssertInstanceOfThrowsExceptionForInvalidArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertInternalType()

public testAssertInternalType() : mixed
Tags
covers
Return values
mixed

testAssertInternalTypeDouble()

public testAssertInternalTypeDouble() : mixed
Tags
covers
Return values
mixed

testAssertInternalTypeThrowsExceptionForInvalidArgument()

public testAssertInternalTypeThrowsExceptionForInvalidArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertIteratorContainsObject()

public testAssertIteratorContainsObject() : mixed
Tags
covers
Return values
mixed

testAssertIteratorContainsString()

public testAssertIteratorContainsString() : mixed
Tags
covers
Return values
mixed

testAssertJson()

public testAssertJson() : mixed
Tags
covers
Return values
mixed

testAssertJsonFileEqualsJsonFile()

public testAssertJsonFileEqualsJsonFile() : mixed
Tags
covers
Return values
mixed

testAssertJsonFileNotEqualsJsonFile()

public testAssertJsonFileNotEqualsJsonFile() : mixed
Tags
covers
Return values
mixed

testAssertJsonRaisesExceptionForInvalidArgument()

public testAssertJsonRaisesExceptionForInvalidArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertJsonStringEqualsJsonFile()

public testAssertJsonStringEqualsJsonFile() : mixed
Tags
covers
Return values
mixed

testAssertJsonStringEqualsJsonFileExpectingException()

public testAssertJsonStringEqualsJsonFileExpectingException() : mixed
Tags
covers
Return values
mixed

testAssertJsonStringEqualsJsonFileExpectingExpectationFailedException()

public testAssertJsonStringEqualsJsonFileExpectingExpectationFailedException() : mixed
Tags
covers
Return values
mixed

testAssertJsonStringEqualsJsonString()

public testAssertJsonStringEqualsJsonString() : mixed
Tags
covers
Return values
mixed

testAssertJsonStringEqualsJsonStringErrorRaised()

public testAssertJsonStringEqualsJsonStringErrorRaised(mixed $expected, mixed $actual) : mixed
Parameters
$expected : mixed
$actual : mixed
Tags
dataProvider

validInvalidJsonDataprovider

covers
Return values
mixed

testAssertJsonStringNotEqualsJsonFile()

public testAssertJsonStringNotEqualsJsonFile() : mixed
Tags
covers
Return values
mixed

testAssertJsonStringNotEqualsJsonFileExpectingException()

public testAssertJsonStringNotEqualsJsonFileExpectingException() : mixed
Tags
covers
Return values
mixed

testAssertJsonStringNotEqualsJsonString()

public testAssertJsonStringNotEqualsJsonString() : mixed
Tags
covers
Return values
mixed

testAssertJsonStringNotEqualsJsonStringErrorRaised()

public testAssertJsonStringNotEqualsJsonStringErrorRaised(mixed $expected, mixed $actual) : mixed
Parameters
$expected : mixed
$actual : mixed
Tags
dataProvider

validInvalidJsonDataprovider

covers
Return values
mixed

testAssertNotContainsOnlyThrowsException()

public testAssertNotContainsOnlyThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertNotContainsThrowsException()

public testAssertNotContainsThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertNotCount()

public testAssertNotCount() : mixed
Tags
covers
Return values
mixed

testAssertNotCountThrowsExceptionIfElementIsNotCountable()

public testAssertNotCountThrowsExceptionIfElementIsNotCountable() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertNotCountThrowsExceptionIfExpectedCountIsNoInteger()

public testAssertNotCountThrowsExceptionIfExpectedCountIsNoInteger() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertNotEmpty()

public testAssertNotEmpty() : mixed
Tags
covers
Return values
mixed

testAssertNotEqualsFails()

public testAssertNotEqualsFails(mixed $a, mixed $b[, mixed $delta = 0.0 ][, mixed $canonicalize = false ][, mixed $ignoreCase = false ]) : mixed
Parameters
$a : mixed
$b : mixed
$delta : mixed = 0.0
$canonicalize : mixed = false
$ignoreCase : mixed = false
Tags
covers
dataProvider

equalProvider

Return values
mixed

testAssertNotEqualsSucceeds()

public testAssertNotEqualsSucceeds(mixed $a, mixed $b[, mixed $delta = 0.0 ][, mixed $canonicalize = false ][, mixed $ignoreCase = false ]) : mixed
Parameters
$a : mixed
$b : mixed
$delta : mixed = 0.0
$canonicalize : mixed = false
$ignoreCase : mixed = false
Tags
covers
dataProvider

notEqualProvider

Return values
mixed

testAssertNotFalse()

public testAssertNotFalse() : mixed
Tags
covers
Return values
mixed

testAssertNotInstanceOf()

public testAssertNotInstanceOf() : mixed
Tags
covers
Return values
mixed

testAssertNotInstanceOfThrowsExceptionForInvalidArgument()

public testAssertNotInstanceOfThrowsExceptionForInvalidArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertNotInternalType()

public testAssertNotInternalType() : mixed
Tags
covers
Return values
mixed

testAssertNotInternalTypeThrowsExceptionForInvalidArgument()

public testAssertNotInternalTypeThrowsExceptionForInvalidArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertNotNull()

public testAssertNotNull() : mixed
Tags
covers
Return values
mixed

testAssertNotRegExp()

public testAssertNotRegExp() : mixed
Tags
covers
Return values
mixed

testAssertNotRegExpThrowsException()

public testAssertNotRegExpThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertNotRegExpThrowsException2()

public testAssertNotRegExpThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertNotSame()

public testAssertNotSame() : mixed
Tags
covers
Return values
mixed

testAssertNotSame2()

public testAssertNotSame2() : mixed
Tags
covers
Return values
mixed

testAssertNotSameFails()

public testAssertNotSameFails(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed
Tags
covers
dataProvider

sameProvider

Return values
mixed

testAssertNotSameFailsNull()

public testAssertNotSameFailsNull() : mixed
Tags
covers
Return values
mixed

testAssertNotSameSize()

public testAssertNotSameSize() : mixed
Tags
covers
Return values
mixed

testAssertNotSameSizeThrowsExceptionIfActualIsNotCountable()

public testAssertNotSameSizeThrowsExceptionIfActualIsNotCountable() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertNotSameSizeThrowsExceptionIfExpectedIsNotCountable()

public testAssertNotSameSizeThrowsExceptionIfExpectedIsNotCountable() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertNotSameSucceeds()

public testAssertNotSameSucceeds(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed
Tags
covers
dataProvider

notSameProvider

Return values
mixed

testAssertNotTrue()

public testAssertNotTrue() : mixed
Tags
covers
Return values
mixed

testAssertNull()

public testAssertNull() : mixed
Tags
covers
Return values
mixed

testAssertObjectHasAttribute()

public testAssertObjectHasAttribute() : mixed
Tags
covers
Return values
mixed

testAssertObjectHasAttributeThrowsException()

public testAssertObjectHasAttributeThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertObjectHasAttributeThrowsException2()

public testAssertObjectHasAttributeThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertObjectHasAttributeThrowsExceptionIfAttributeNameIsNotValid()

public testAssertObjectHasAttributeThrowsExceptionIfAttributeNameIsNotValid() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertObjectNotHasAttribute()

public testAssertObjectNotHasAttribute() : mixed
Tags
covers
Return values
mixed

testAssertObjectNotHasAttributeThrowsException()

public testAssertObjectNotHasAttributeThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertObjectNotHasAttributeThrowsException2()

public testAssertObjectNotHasAttributeThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertObjectNotHasAttributeThrowsExceptionIfAttributeNameIsNotValid()

public testAssertObjectNotHasAttributeThrowsExceptionIfAttributeNameIsNotValid() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertPrivateAttributeContains()

public testAssertPrivateAttributeContains() : mixed
Tags
covers
Return values
mixed

testAssertPrivateAttributeEquals()

public testAssertPrivateAttributeEquals() : mixed
Tags
covers
Return values
mixed

testAssertPrivateAttributeNotContains()

public testAssertPrivateAttributeNotContains() : mixed
Tags
covers
Return values
mixed

testAssertPrivateAttributeNotEquals()

public testAssertPrivateAttributeNotEquals() : mixed
Tags
covers
Return values
mixed

testAssertPrivateStaticAttributeEquals()

public testAssertPrivateStaticAttributeEquals() : mixed
Tags
covers
Return values
mixed

testAssertPrivateStaticAttributeNotEquals()

public testAssertPrivateStaticAttributeNotEquals() : mixed
Tags
covers
Return values
mixed

testAssertProtectedAttributeContains()

public testAssertProtectedAttributeContains() : mixed
Tags
covers
Return values
mixed

testAssertProtectedAttributeEquals()

public testAssertProtectedAttributeEquals() : mixed
Tags
covers
Return values
mixed

testAssertProtectedAttributeNotContains()

public testAssertProtectedAttributeNotContains() : mixed
Tags
covers
Return values
mixed

testAssertProtectedAttributeNotEquals()

public testAssertProtectedAttributeNotEquals() : mixed
Tags
covers
Return values
mixed

testAssertProtectedStaticAttributeEquals()

public testAssertProtectedStaticAttributeEquals() : mixed
Tags
covers
Return values
mixed

testAssertProtectedStaticAttributeNotEquals()

public testAssertProtectedStaticAttributeNotEquals() : mixed
Tags
covers
Return values
mixed

testAssertPublicAttributeContains()

public testAssertPublicAttributeContains() : mixed
Tags
covers
Return values
mixed

testAssertPublicAttributeContainsOnly()

public testAssertPublicAttributeContainsOnly() : mixed
Tags
covers
Return values
mixed

testAssertPublicAttributeEquals()

public testAssertPublicAttributeEquals() : mixed
Tags
covers
Return values
mixed

testAssertPublicAttributeNotContains()

public testAssertPublicAttributeNotContains() : mixed
Tags
covers
Return values
mixed

testAssertPublicAttributeNotContainsOnly()

public testAssertPublicAttributeNotContainsOnly() : mixed
Tags
covers
Return values
mixed

testAssertPublicAttributeNotEquals()

public testAssertPublicAttributeNotEquals() : mixed
Tags
covers
Return values
mixed

testAssertPublicAttributeNotSame()

public testAssertPublicAttributeNotSame() : mixed
Tags
covers
Return values
mixed

testAssertPublicAttributeSame()

public testAssertPublicAttributeSame() : mixed
Tags
covers
Return values
mixed

testAssertPublicStaticAttributeEquals()

public testAssertPublicStaticAttributeEquals() : mixed
Tags
covers
Return values
mixed

testAssertPublicStaticAttributeNotEquals()

public testAssertPublicStaticAttributeNotEquals() : mixed
Tags
covers
Return values
mixed

testAssertRegExp()

public testAssertRegExp() : mixed
Tags
covers
Return values
mixed

testAssertRegExpThrowsException()

public testAssertRegExpThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertRegExpThrowsException2()

public testAssertRegExpThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertSame()

public testAssertSame() : mixed
Tags
covers
Return values
mixed

testAssertSame2()

public testAssertSame2() : mixed
Tags
covers
Return values
mixed

testAssertSameFails()

public testAssertSameFails(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed
Tags
covers
dataProvider

notSameProvider

Return values
mixed

testAssertSameSize()

public testAssertSameSize() : mixed
Tags
covers
Return values
mixed

testAssertSameSizeThrowsExceptionIfActualIsNotCountable()

public testAssertSameSizeThrowsExceptionIfActualIsNotCountable() : mixed
Tags
covers
Return values
mixed

testAssertSameSizeThrowsExceptionIfExpectedIsNotCountable()

public testAssertSameSizeThrowsExceptionIfExpectedIsNotCountable() : mixed
Tags
covers
Return values
mixed

testAssertSameSucceeds()

public testAssertSameSucceeds(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed
Tags
covers
dataProvider

sameProvider

Return values
mixed

testAssertSplObjectStorageContainsObject()

public testAssertSplObjectStorageContainsObject() : mixed
Tags
covers
Return values
mixed

testAssertSplObjectStorageNotContainsObject()

public testAssertSplObjectStorageNotContainsObject() : mixed
Tags
covers
Return values
mixed

testAssertStringContainsString()

public testAssertStringContainsString() : mixed
Tags
covers
Return values
mixed

testAssertStringEndsNotWith()

public testAssertStringEndsNotWith() : mixed
Tags
covers
Return values
mixed

testAssertStringEndsNotWithThrowsException()

public testAssertStringEndsNotWithThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringEndsNotWithThrowsException2()

public testAssertStringEndsNotWithThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringEndsWith()

public testAssertStringEndsWith() : mixed
Tags
covers
Return values
mixed

testAssertStringEndsWithThrowsException()

public testAssertStringEndsWithThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringEndsWithThrowsException2()

public testAssertStringEndsWithThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringEqualsFile()

public testAssertStringEqualsFile() : mixed
Tags
covers
Return values
mixed

testAssertStringEqualsNumeric()

public testAssertStringEqualsNumeric() : mixed
Tags
covers
Return values
mixed

testAssertStringEqualsNumeric2()

public testAssertStringEqualsNumeric2() : mixed
Tags
covers
Return values
mixed

testAssertStringMatchesFormat()

public testAssertStringMatchesFormat() : mixed
Tags
covers
Return values
mixed

testAssertStringMatchesFormatFailure()

public testAssertStringMatchesFormatFailure() : mixed
Tags
covers
expectedException

PHPUnit_Framework_AssertionFailedError

Return values
mixed

testAssertStringMatchesFormatFile()

public testAssertStringMatchesFormatFile() : mixed
Tags
covers
Return values
mixed

testAssertStringMatchesFormatFileThrowsExceptionForInvalidArgument()

public testAssertStringMatchesFormatFileThrowsExceptionForInvalidArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringMatchesFormatFileThrowsExceptionForInvalidArgument2()

public testAssertStringMatchesFormatFileThrowsExceptionForInvalidArgument2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringMatchesFormatRaisesExceptionForInvalidFirstArgument()

public testAssertStringMatchesFormatRaisesExceptionForInvalidFirstArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringMatchesFormatRaisesExceptionForInvalidSecondArgument()

public testAssertStringMatchesFormatRaisesExceptionForInvalidSecondArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringNotContainsString()

public testAssertStringNotContainsString() : mixed
Tags
covers
Return values
mixed

testAssertStringNotEqualsFile()

public testAssertStringNotEqualsFile() : mixed
Tags
covers
Return values
mixed

testAssertStringNotMatchesFormat()

public testAssertStringNotMatchesFormat() : mixed
Tags
covers
Return values
mixed

testAssertStringNotMatchesFormatFile()

public testAssertStringNotMatchesFormatFile() : mixed
Tags
covers
Return values
mixed

testAssertStringNotMatchesFormatFileThrowsExceptionForInvalidArgument()

public testAssertStringNotMatchesFormatFileThrowsExceptionForInvalidArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringNotMatchesFormatFileThrowsExceptionForInvalidArgument2()

public testAssertStringNotMatchesFormatFileThrowsExceptionForInvalidArgument2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringNotMatchesFormatRaisesExceptionForInvalidFirstArgument()

public testAssertStringNotMatchesFormatRaisesExceptionForInvalidFirstArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringNotMatchesFormatRaisesExceptionForInvalidSecondArgument()

public testAssertStringNotMatchesFormatRaisesExceptionForInvalidSecondArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringStartsNotWith()

public testAssertStringStartsNotWith() : mixed
Tags
covers
Return values
mixed

testAssertStringStartsNotWithThrowsException()

public testAssertStringStartsNotWithThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringStartsNotWithThrowsException2()

public testAssertStringStartsNotWithThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringStartsWith()

public testAssertStringStartsWith() : mixed
Tags
covers
Return values
mixed

testAssertStringStartsWithThrowsException()

public testAssertStringStartsWithThrowsException() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertStringStartsWithThrowsException2()

public testAssertStringStartsWithThrowsException2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testAssertThatAnything()

public testAssertThatAnything() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatAnythingAndAnything()

public testAssertThatAnythingAndAnything() : mixed
Tags
covers
covers
covers
Return values
mixed

testAssertThatAnythingOrAnything()

public testAssertThatAnythingOrAnything() : mixed
Tags
covers
covers
covers
Return values
mixed

testAssertThatAnythingXorNotAnything()

public testAssertThatAnythingXorNotAnything() : mixed
Tags
covers
covers
covers
covers
Return values
mixed

testAssertThatArrayHasKey()

public testAssertThatArrayHasKey() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatAttributeEquals()

public testAssertThatAttributeEquals() : mixed
Tags
covers
covers
covers
Return values
mixed

testAssertThatAttributeEquals2()

public testAssertThatAttributeEquals2() : mixed
Tags
covers
covers
covers
expectedException

PHPUnit_Framework_AssertionFailedError

Return values
mixed

testAssertThatAttributeEqualTo()

public testAssertThatAttributeEqualTo() : mixed
Tags
covers
covers
covers
Return values
mixed

testAssertThatCallback()

public testAssertThatCallback() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatClassHasAttribute()

public testAssertThatClassHasAttribute() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatClassHasStaticAttribute()

public testAssertThatClassHasStaticAttribute() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatContains()

public testAssertThatContains() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatContainsOnly()

public testAssertThatContainsOnly() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatContainsOnlyInstancesOf()

public testAssertThatContainsOnlyInstancesOf() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatCountOf()

public testAssertThatCountOf() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatEqualTo()

public testAssertThatEqualTo() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatFileExists()

public testAssertThatFileExists() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatGreaterThan()

public testAssertThatGreaterThan() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatGreaterThanOrEqual()

public testAssertThatGreaterThanOrEqual() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatIdenticalTo()

public testAssertThatIdenticalTo() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatIsEmpty()

public testAssertThatIsEmpty() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatIsFalse()

public testAssertThatIsFalse() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatIsInstanceOf()

public testAssertThatIsInstanceOf() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatIsJson()

public testAssertThatIsJson() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatIsTrue()

public testAssertThatIsTrue() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatIsType()

public testAssertThatIsType() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatLessThan()

public testAssertThatLessThan() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatLessThanOrEqual()

public testAssertThatLessThanOrEqual() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatMatchesRegularExpression()

public testAssertThatMatchesRegularExpression() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatObjectHasAttribute()

public testAssertThatObjectHasAttribute() : mixed
Tags
covers
covers
Return values
mixed

testAssertThatStringContains()

public testAssertThatStringContains() : mixed
Tags
covers
covers
Return values
mixed

testAssertTrue()

public testAssertTrue() : mixed
Tags
covers
Return values
mixed

testAssertXmlFileEqualsXmlFile()

public testAssertXmlFileEqualsXmlFile() : mixed
Tags
covers
Return values
mixed

testAssertXmlFileNotEqualsXmlFile()

public testAssertXmlFileNotEqualsXmlFile() : mixed
Tags
covers
Return values
mixed

testAssertXmlStringEqualsXmlFile()

public testAssertXmlStringEqualsXmlFile() : mixed
Tags
covers
Return values
mixed

testAssertXmlStringEqualsXmlString()

public testAssertXmlStringEqualsXmlString() : mixed
Tags
covers
Return values
mixed

testAssertXmlStringEqualsXmlString2()

public testAssertXmlStringEqualsXmlString2() : mixed
Tags
expectedException

PHPUnit_Framework_Exception

covers
ticket

1860

Return values
mixed

testAssertXmlStringEqualsXmlString3()

public testAssertXmlStringEqualsXmlString3() : mixed
Tags
covers
ticket

1860

Return values
mixed

testAssertXmlStringNotEqualsXmlString()

public testAssertXmlStringNotEqualsXmlString() : mixed
Tags
covers
Return values
mixed

testAttributeGreaterThan()

public testAttributeGreaterThan() : mixed
Tags
covers
Return values
mixed

testAttributeGreaterThanOrEqual()

public testAttributeGreaterThanOrEqual() : mixed
Tags
covers
Return values
mixed

testAttributeLessThan()

public testAttributeLessThan() : mixed
Tags
covers
Return values
mixed

testAttributeLessThanOrEqual()

public testAttributeLessThanOrEqual() : mixed
Tags
covers
Return values
mixed

testClassHasPublicAttribute()

public testClassHasPublicAttribute() : mixed
Tags
covers
Return values
mixed

testClassHasPublicStaticAttribute()

public testClassHasPublicStaticAttribute() : mixed
Tags
covers
Return values
mixed

testClassNotHasPublicAttribute()

public testClassNotHasPublicAttribute() : mixed
Tags
covers
Return values
mixed

testClassNotHasPublicStaticAttribute()

public testClassNotHasPublicStaticAttribute() : mixed
Tags
covers
Return values
mixed

testFail()

public testFail() : mixed
Tags
covers
Return values
mixed

testGetObjectAttributeRaisesExceptionForInvalidFirstArgument()

public testGetObjectAttributeRaisesExceptionForInvalidFirstArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testGetObjectAttributeRaisesExceptionForInvalidSecondArgument()

public testGetObjectAttributeRaisesExceptionForInvalidSecondArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testGetObjectAttributeRaisesExceptionForInvalidSecondArgument2()

public testGetObjectAttributeRaisesExceptionForInvalidSecondArgument2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testGetObjectAttributeRaisesExceptionForInvalidSecondArgument3()

public testGetObjectAttributeRaisesExceptionForInvalidSecondArgument3() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testGetObjectAttributeWorksForInheritedAttributes()

public testGetObjectAttributeWorksForInheritedAttributes() : mixed
Tags
covers
Return values
mixed

testGetStaticAttributeRaisesExceptionForInvalidFirstArgument()

public testGetStaticAttributeRaisesExceptionForInvalidFirstArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testGetStaticAttributeRaisesExceptionForInvalidFirstArgument2()

public testGetStaticAttributeRaisesExceptionForInvalidFirstArgument2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testGetStaticAttributeRaisesExceptionForInvalidSecondArgument()

public testGetStaticAttributeRaisesExceptionForInvalidSecondArgument() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testGetStaticAttributeRaisesExceptionForInvalidSecondArgument2()

public testGetStaticAttributeRaisesExceptionForInvalidSecondArgument2() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testGetStaticAttributeRaisesExceptionForInvalidSecondArgument3()

public testGetStaticAttributeRaisesExceptionForInvalidSecondArgument3() : mixed
Tags
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testGreaterThan()

public testGreaterThan() : mixed
Tags
covers
Return values
mixed

testGreaterThanOrEqual()

public testGreaterThanOrEqual() : mixed
Tags
covers
Return values
mixed

testLessThan()

public testLessThan() : mixed
Tags
covers
Return values
mixed

testLessThanOrEqual()

public testLessThanOrEqual() : mixed
Tags
covers
Return values
mixed

testMarkTestIncomplete()

public testMarkTestIncomplete() : mixed
Tags
covers
Return values
mixed

testMarkTestSkipped()

public testMarkTestSkipped() : mixed
Tags
covers
Return values
mixed

testObjectHasOnTheFlyAttribute()

public testObjectHasOnTheFlyAttribute() : mixed
Tags
covers
Return values
mixed

testObjectHasPrivateAttribute()

public testObjectHasPrivateAttribute() : mixed
Tags
covers
Return values
mixed

testObjectHasProtectedAttribute()

public testObjectHasProtectedAttribute() : mixed
Tags
covers
Return values
mixed

testObjectHasPublicAttribute()

public testObjectHasPublicAttribute() : mixed
Tags
covers
Return values
mixed

testObjectNotHasOnTheFlyAttribute()

public testObjectNotHasOnTheFlyAttribute() : mixed
Tags
covers
Return values
mixed

testObjectNotHasPrivateAttribute()

public testObjectNotHasPrivateAttribute() : mixed
Tags
covers
Return values
mixed

testObjectNotHasProtectedAttribute()

public testObjectNotHasProtectedAttribute() : mixed
Tags
covers
Return values
mixed

testObjectNotHasPublicAttribute()

public testObjectNotHasPublicAttribute() : mixed
Tags
covers
Return values
mixed

testReadAttribute()

public testReadAttribute() : mixed
Tags
covers
covers
covers
Return values
mixed

testReadAttribute2()

public testReadAttribute2() : mixed
Tags
covers
covers
covers
Return values
mixed

testReadAttribute3()

public testReadAttribute3() : mixed
Tags
covers
covers
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testReadAttribute4()

public testReadAttribute4() : mixed
Tags
covers
covers
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testReadAttribute5()

public testReadAttribute5() : mixed
Tags
covers
covers
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testReadAttributeIfAttributeNameIsNotValid()

public testReadAttributeIfAttributeNameIsNotValid() : mixed
Tags
covers
covers
covers
expectedException

PHPUnit_Framework_Exception

Return values
mixed

testXmlStringNotEqualsXmlFile()

public testXmlStringNotEqualsXmlFile() : mixed
Tags
covers
Return values
mixed

testXMLStructureAttributesAreSameButValuesAreNot()

public testXMLStructureAttributesAreSameButValuesAreNot() : mixed
Tags
covers
Return values
mixed

testXMLStructureIgnoreTextNodes()

public testXMLStructureIgnoreTextNodes() : mixed
Tags
covers
Return values
mixed

testXMLStructureIsSame()

public testXMLStructureIsSame() : mixed
Tags
covers
Return values
mixed

testXMLStructureIsSameButDataIsNot()

public testXMLStructureIsSameButDataIsNot() : mixed
Tags
covers
Return values
mixed

testXMLStructureWrongNumberOfAttributes()

public testXMLStructureWrongNumberOfAttributes() : mixed
Tags
covers
expectedException

PHPUnit_Framework_ExpectationFailedException

Return values
mixed

testXMLStructureWrongNumberOfNodes()

public testXMLStructureWrongNumberOfNodes() : mixed
Tags
covers
expectedException

PHPUnit_Framework_ExpectationFailedException

Return values
mixed

toString()

Returns a string representation of the test case.

public toString() : string
Return values
string

validInvalidJsonDataprovider()

public static validInvalidJsonDataprovider() : array<string|int, mixed>
Return values
array<string|int, mixed>

assertPostConditions()

Performs assertions shared by all tests of a test case.

protected assertPostConditions() : mixed

This method is called before the execution of a test ends and before tearDown() is called.

Tags
since

Method available since Release 3.2.8

Return values
mixed

assertPreConditions()

Performs assertions shared by all tests of a test case.

protected assertPreConditions() : mixed

This method is called before the execution of a test starts and after setUp() is called.

Tags
since

Method available since Release 3.2.8

Return values
mixed

checkRequirements()

protected checkRequirements() : mixed
Tags
since

Method available since Release 3.6.0

Return values
mixed

equalValues()

protected equalValues() : mixed
Return values
mixed

getDataSetAsString()

Gets the data set description of a TestCase.

protected getDataSetAsString([bool $includeData = true ]) : string
Parameters
$includeData : bool = true
Tags
since

Method available since Release 3.3.0

Return values
string

getMockClass()

Mocks the specified class and returns the name of the mocked class.

protected getMockClass(string $originalClassName[, array<string|int, mixed> $methods = array() ][, array<string|int, mixed> $arguments = array() ][, string $mockClassName = '' ][, bool $callOriginalConstructor = false ][, bool $callOriginalClone = true ][, bool $callAutoload = true ][, bool $cloneArguments = false ]) : string
Parameters
$originalClassName : string
$methods : array<string|int, mixed> = array()
$arguments : array<string|int, mixed> = array()
$mockClassName : string = ''
$callOriginalConstructor : bool = false
$callOriginalClone : bool = true
$callAutoload : bool = true
$cloneArguments : bool = false
Tags
throws
PHPUnit_Framework_Exception
since

Method available since Release 3.5.0

Return values
string

getMockFromWsdl()

Returns a mock object based on the given WSDL file.

protected getMockFromWsdl(string $wsdlFile[, string $originalClassName = '' ][, string $mockClassName = '' ][, array<string|int, mixed> $methods = array() ][, bool $callOriginalConstructor = true ][, array<string|int, mixed> $options = array() ]) : PHPUnit_Framework_MockObject_MockObject
Parameters
$wsdlFile : string
$originalClassName : string = ''
$mockClassName : string = ''
$methods : array<string|int, mixed> = array()
$callOriginalConstructor : bool = true
$options : array<string|int, mixed> = array()

An array of options passed to SOAPClient::_construct

Tags
since

Method available since Release 3.4.0

Return values
PHPUnit_Framework_MockObject_MockObject

getObjectForTrait()

Returns an object for the specified trait.

protected getObjectForTrait(string $traitName[, array<string|int, mixed> $arguments = array() ][, string $traitClassName = '' ][, bool $callOriginalConstructor = true ][, bool $callOriginalClone = true ][, bool $callAutoload = true ][, bool $cloneArguments = false ]) : object
Parameters
$traitName : string
$arguments : array<string|int, mixed> = array()
$traitClassName : string = ''
$callOriginalConstructor : bool = true
$callOriginalClone : bool = true
$callAutoload : bool = true
$cloneArguments : bool = false
Tags
since

Method available since Release 3.6.0

throws
PHPUnit_Framework_Exception
Return values
object

handleDependencies()

protected handleDependencies() : mixed
Tags
since

Method available since Release 3.5.4

Return values
mixed

iniSet()

This method is a wrapper for the ini_set() function that automatically resets the modified php.ini setting to its original value after the test is run.

protected iniSet(string $varName, string $newValue) : mixed
Parameters
$varName : string
$newValue : string
Tags
throws
PHPUnit_Framework_Exception
since

Method available since Release 3.0.0

Return values
mixed

notEqualValues()

protected notEqualValues() : mixed
Return values
mixed

onNotSuccessfulTest()

This method is called when a test method did not execute successfully.

protected onNotSuccessfulTest(Exception $e) : mixed
Parameters
$e : Exception
Tags
since

Method available since Release 3.4.0

throws
Exception
Return values
mixed

prepareTemplate()

Performs custom preparations on the process isolation template.

protected prepareTemplate(Text_Template $template) : mixed
Parameters
$template : Text_Template
Tags
since

Method available since Release 3.4.0

Return values
mixed

prophesize()

protected prophesize([string|null $classOrInterface = null ]) : ObjectProphecy
Parameters
$classOrInterface : string|null = null
Tags
throws
LogicException
since

Method available since Release 4.5.0

Return values
ObjectProphecy

sameValues()

protected sameValues() : mixed
Return values
mixed

setExpectedExceptionFromAnnotation()

protected setExpectedExceptionFromAnnotation() : mixed
Tags
since

Method available since Release 3.4.0

Return values
mixed

setLocale()

This method is a wrapper for the setlocale() function that automatically resets the locale to its original value after the test is run.

protected setLocale() : mixed
Tags
throws
PHPUnit_Framework_Exception
since

Method available since Release 3.1.0

Return values
mixed

setUp()

Sets up the fixture, for example, open a network connection.

protected setUp() : mixed

This method is called before a test is executed.

Return values
mixed

setUseErrorHandlerFromAnnotation()

protected setUseErrorHandlerFromAnnotation() : mixed
Tags
since

Method available since Release 3.4.0

Return values
mixed

tearDown()

Tears down the fixture, for example, close a network connection.

protected tearDown() : mixed

This method is called after a test is executed.

Return values
mixed

verifyMockObjects()

Verifies the mock object expectations.

protected verifyMockObjects() : mixed
Tags
since

Method available since Release 3.5.0

Return values
mixed

compareGlobalStateSnapshotPart()

private compareGlobalStateSnapshotPart(array<string|int, mixed> $before, array<string|int, mixed> $after, string $header) : mixed
Parameters
$before : array<string|int, mixed>
$after : array<string|int, mixed>
$header : string
Tags
throws
PHPUnit_Framework_RiskyTestError
Return values
mixed

compareGlobalStateSnapshots()

private compareGlobalStateSnapshots(Snapshot $before, Snapshot $after) : mixed
Parameters
$before : Snapshot
$after : Snapshot
Tags
throws
PHPUnit_Framework_RiskyTestError
Return values
mixed

createGlobalStateSnapshot()

private createGlobalStateSnapshot(bool $backupGlobals) : Snapshot
Parameters
$backupGlobals : bool
Return values
Snapshot

getProphet()

private getProphet() : Prophet
Tags
since

Method available since Release 4.5.0

Return values
Prophet

restoreGlobalState()

private restoreGlobalState() : mixed
Return values
mixed

snapshotGlobalState()

private snapshotGlobalState() : mixed
Return values
mixed

startOutputBuffering()

private startOutputBuffering() : mixed
Tags
since

Method available since Release 4.2.0

Return values
mixed

stopOutputBuffering()

private stopOutputBuffering() : mixed
Tags
since

Method available since Release 4.2.0

Return values
mixed

Search results