BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
PHPUnit_Framework_Assert Class Reference
Inheritance diagram for PHPUnit_Framework_Assert:

Static Public Member Functions

static assertArrayHasKey ($key, $array, $message= '')
 
static assertArraySubset ($subset, $array, $strict=false, $message= '')
 
static assertArrayNotHasKey ($key, $array, $message= '')
 
static assertContains ($needle, $haystack, $message= '', $ignoreCase=false, $checkForObjectIdentity=true, $checkForNonObjectIdentity=false)
 
static assertAttributeContains ($needle, $haystackAttributeName, $haystackClassOrObject, $message= '', $ignoreCase=false, $checkForObjectIdentity=true, $checkForNonObjectIdentity=false)
 
static assertNotContains ($needle, $haystack, $message= '', $ignoreCase=false, $checkForObjectIdentity=true, $checkForNonObjectIdentity=false)
 
static assertAttributeNotContains ($needle, $haystackAttributeName, $haystackClassOrObject, $message= '', $ignoreCase=false, $checkForObjectIdentity=true, $checkForNonObjectIdentity=false)
 
static assertContainsOnly ($type, $haystack, $isNativeType=null, $message= '')
 
static assertContainsOnlyInstancesOf ($classname, $haystack, $message= '')
 
static assertAttributeContainsOnly ($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType=null, $message= '')
 
static assertNotContainsOnly ($type, $haystack, $isNativeType=null, $message= '')
 
static assertAttributeNotContainsOnly ($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType=null, $message= '')
 
static assertCount ($expectedCount, $haystack, $message= '')
 
static assertAttributeCount ($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message= '')
 
static assertNotCount ($expectedCount, $haystack, $message= '')
 
static assertAttributeNotCount ($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message= '')
 
static assertEquals ($expected, $actual, $message= '', $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static assertAttributeEquals ($expected, $actualAttributeName, $actualClassOrObject, $message= '', $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static assertNotEquals ($expected, $actual, $message= '', $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static assertAttributeNotEquals ($expected, $actualAttributeName, $actualClassOrObject, $message= '', $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static assertEmpty ($actual, $message= '')
 
static assertAttributeEmpty ($haystackAttributeName, $haystackClassOrObject, $message= '')
 
static assertNotEmpty ($actual, $message= '')
 
static assertAttributeNotEmpty ($haystackAttributeName, $haystackClassOrObject, $message= '')
 
static assertGreaterThan ($expected, $actual, $message= '')
 
static assertAttributeGreaterThan ($expected, $actualAttributeName, $actualClassOrObject, $message= '')
 
static assertGreaterThanOrEqual ($expected, $actual, $message= '')
 
static assertAttributeGreaterThanOrEqual ($expected, $actualAttributeName, $actualClassOrObject, $message= '')
 
static assertLessThan ($expected, $actual, $message= '')
 
static assertAttributeLessThan ($expected, $actualAttributeName, $actualClassOrObject, $message= '')
 
static assertLessThanOrEqual ($expected, $actual, $message= '')
 
static assertAttributeLessThanOrEqual ($expected, $actualAttributeName, $actualClassOrObject, $message= '')
 
static assertFileEquals ($expected, $actual, $message= '', $canonicalize=false, $ignoreCase=false)
 
static assertFileNotEquals ($expected, $actual, $message= '', $canonicalize=false, $ignoreCase=false)
 
static assertStringEqualsFile ($expectedFile, $actualString, $message= '', $canonicalize=false, $ignoreCase=false)
 
static assertStringNotEqualsFile ($expectedFile, $actualString, $message= '', $canonicalize=false, $ignoreCase=false)
 
static assertFileExists ($filename, $message= '')
 
static assertFileNotExists ($filename, $message= '')
 
static assertTrue ($condition, $message= '')
 
static assertNotTrue ($condition, $message= '')
 
static assertFalse ($condition, $message= '')
 
static assertNotFalse ($condition, $message= '')
 
static assertNotNull ($actual, $message= '')
 
static assertNull ($actual, $message= '')
 
static assertClassHasAttribute ($attributeName, $className, $message= '')
 
static assertClassNotHasAttribute ($attributeName, $className, $message= '')
 
static assertClassHasStaticAttribute ($attributeName, $className, $message= '')
 
static assertClassNotHasStaticAttribute ($attributeName, $className, $message= '')
 
static assertObjectHasAttribute ($attributeName, $object, $message= '')
 
static assertObjectNotHasAttribute ($attributeName, $object, $message= '')
 
static assertSame ($expected, $actual, $message= '')
 
static assertAttributeSame ($expected, $actualAttributeName, $actualClassOrObject, $message= '')
 
static assertNotSame ($expected, $actual, $message= '')
 
static assertAttributeNotSame ($expected, $actualAttributeName, $actualClassOrObject, $message= '')
 
static assertInstanceOf ($expected, $actual, $message= '')
 
static assertAttributeInstanceOf ($expected, $attributeName, $classOrObject, $message= '')
 
static assertNotInstanceOf ($expected, $actual, $message= '')
 
static assertAttributeNotInstanceOf ($expected, $attributeName, $classOrObject, $message= '')
 
static assertInternalType ($expected, $actual, $message= '')
 
static assertAttributeInternalType ($expected, $attributeName, $classOrObject, $message= '')
 
static assertNotInternalType ($expected, $actual, $message= '')
 
static assertAttributeNotInternalType ($expected, $attributeName, $classOrObject, $message= '')
 
static assertRegExp ($pattern, $string, $message= '')
 
static assertNotRegExp ($pattern, $string, $message= '')
 
static assertSameSize ($expected, $actual, $message= '')
 
static assertNotSameSize ($expected, $actual, $message= '')
 
static assertStringMatchesFormat ($format, $string, $message= '')
 
static assertStringNotMatchesFormat ($format, $string, $message= '')
 
static assertStringMatchesFormatFile ($formatFile, $string, $message= '')
 
static assertStringNotMatchesFormatFile ($formatFile, $string, $message= '')
 
static assertStringStartsWith ($prefix, $string, $message= '')
 
static assertStringStartsNotWith ($prefix, $string, $message= '')
 
static assertStringEndsWith ($suffix, $string, $message= '')
 
static assertStringEndsNotWith ($suffix, $string, $message= '')
 
static assertXmlFileEqualsXmlFile ($expectedFile, $actualFile, $message= '')
 
static assertXmlFileNotEqualsXmlFile ($expectedFile, $actualFile, $message= '')
 
static assertXmlStringEqualsXmlFile ($expectedFile, $actualXml, $message= '')
 
static assertXmlStringNotEqualsXmlFile ($expectedFile, $actualXml, $message= '')
 
static assertXmlStringEqualsXmlString ($expectedXml, $actualXml, $message= '')
 
static assertXmlStringNotEqualsXmlString ($expectedXml, $actualXml, $message= '')
 
static assertEqualXMLStructure (DOMElement $expectedElement, DOMElement $actualElement, $checkAttributes=false, $message= '')
 
static assertSelectCount ($selector, $count, $actual, $message= '', $isHtml=true)
 
static assertSelectRegExp ($selector, $pattern, $count, $actual, $message= '', $isHtml=true)
 
static assertSelectEquals ($selector, $content, $count, $actual, $message= '', $isHtml=true)
 
static assertTag ($matcher, $actual, $message= '', $isHtml=true)
 
static assertNotTag ($matcher, $actual, $message= '', $isHtml=true)
 
static assertThat ($value, PHPUnit_Framework_Constraint $constraint, $message= '')
 
static assertJson ($actualJson, $message= '')
 
static assertJsonStringEqualsJsonString ($expectedJson, $actualJson, $message= '')
 
static assertJsonStringNotEqualsJsonString ($expectedJson, $actualJson, $message= '')
 
static assertJsonStringEqualsJsonFile ($expectedFile, $actualJson, $message= '')
 
static assertJsonStringNotEqualsJsonFile ($expectedFile, $actualJson, $message= '')
 
static assertJsonFileNotEqualsJsonFile ($expectedFile, $actualFile, $message= '')
 
static assertJsonFileEqualsJsonFile ($expectedFile, $actualFile, $message= '')
 
static logicalAnd ()
 
static logicalOr ()
 
static logicalNot (PHPUnit_Framework_Constraint $constraint)
 
static logicalXor ()
 
static anything ()
 
static isTrue ()
 
static callback ($callback)
 
static isFalse ()
 
static isJson ()
 
static isNull ()
 
static attribute (PHPUnit_Framework_Constraint $constraint, $attributeName)
 
static contains ($value, $checkForObjectIdentity=true, $checkForNonObjectIdentity=false)
 
static containsOnly ($type)
 
static containsOnlyInstancesOf ($classname)
 
static arrayHasKey ($key)
 
static equalTo ($value, $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static attributeEqualTo ($attributeName, $value, $delta=0.0, $maxDepth=10, $canonicalize=false, $ignoreCase=false)
 
static isEmpty ()
 
static fileExists ()
 
static greaterThan ($value)
 
static greaterThanOrEqual ($value)
 
static classHasAttribute ($attributeName)
 
static classHasStaticAttribute ($attributeName)
 
static objectHasAttribute ($attributeName)
 
static identicalTo ($value)
 
static isInstanceOf ($className)
 
static isType ($type)
 
static lessThan ($value)
 
static lessThanOrEqual ($value)
 
static matchesRegularExpression ($pattern)
 
static matches ($string)
 
static stringStartsWith ($prefix)
 
static stringContains ($string, $case=true)
 
static stringEndsWith ($suffix)
 
static countOf ($count)
 
static fail ($message= '')
 
static readAttribute ($classOrObject, $attributeName)
 
static getStaticAttribute ($className, $attributeName)
 
static getObjectAttribute ($object, $attributeName)
 
static markTestIncomplete ($message= '')
 
static markTestSkipped ($message= '')
 
static getCount ()
 
static resetCount ()
 

Detailed Description

A set of assertion methods.

Since
Class available since Release 2.0.0

Member Function Documentation

static PHPUnit_Framework_Assert::anything ( )
static

Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.

Returns
PHPUnit_Framework_Constraint_IsAnything
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::arrayHasKey (   $key)
static

Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.

Parameters
mixed$key
Returns
PHPUnit_Framework_Constraint_ArrayHasKey
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::assertArrayHasKey (   $key,
  $array,
  $message = '' 
)
static

Asserts that an array has a specified key.

Parameters
mixed$key
array | ArrayAccess$array
string$message
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::assertArrayNotHasKey (   $key,
  $array,
  $message = '' 
)
static

Asserts that an array does not have a specified key.

Parameters
mixed$key
array | ArrayAccess$array
string$message
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::assertArraySubset (   $subset,
  $array,
  $strict = false,
  $message = '' 
)
static

Asserts that an array has a specified subset.

Parameters
array | ArrayAccess$subset
array | ArrayAccess$array
bool$strictCheck for object identity
string$message
Since
Method available since Release 4.4.0
static PHPUnit_Framework_Assert::assertAttributeContains (   $needle,
  $haystackAttributeName,
  $haystackClassOrObject,
  $message = '',
  $ignoreCase = false,
  $checkForObjectIdentity = true,
  $checkForNonObjectIdentity = false 
)
static

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

Parameters
mixed$needle
string$haystackAttributeName
mixed$haystackClassOrObject
string$message
bool$ignoreCase
bool$checkForObjectIdentity
bool$checkForNonObjectIdentity
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::assertAttributeContainsOnly (   $type,
  $haystackAttributeName,
  $haystackClassOrObject,
  $isNativeType = null,
  $message = '' 
)
static

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.

Parameters
string$type
string$haystackAttributeName
mixed$haystackClassOrObject
bool$isNativeType
string$message
Since
Method available since Release 3.1.4
static PHPUnit_Framework_Assert::assertAttributeCount (   $expectedCount,
  $haystackAttributeName,
  $haystackClassOrObject,
  $message = '' 
)
static

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

Parameters
int$expectedCount
string$haystackAttributeName
mixed$haystackClassOrObject
string$message
Since
Method available since Release 3.6.0
static PHPUnit_Framework_Assert::assertAttributeEmpty (   $haystackAttributeName,
  $haystackClassOrObject,
  $message = '' 
)
static

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

Parameters
string$haystackAttributeName
mixed$haystackClassOrObject
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertAttributeEquals (   $expected,
  $actualAttributeName,
  $actualClassOrObject,
  $message = '',
  $delta = 0.0,
  $maxDepth = 10,
  $canonicalize = false,
  $ignoreCase = false 
)
static

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

Parameters
mixed$expected
string$actualAttributeName
string$actualClassOrObject
string$message
float$delta
int$maxDepth
bool$canonicalize
bool$ignoreCase
static PHPUnit_Framework_Assert::assertAttributeGreaterThan (   $expected,
  $actualAttributeName,
  $actualClassOrObject,
  $message = '' 
)
static

Asserts that an attribute is greater than another value.

Parameters
mixed$expected
string$actualAttributeName
string$actualClassOrObject
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertAttributeGreaterThanOrEqual (   $expected,
  $actualAttributeName,
  $actualClassOrObject,
  $message = '' 
)
static

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

Parameters
mixed$expected
string$actualAttributeName
string$actualClassOrObject
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertAttributeInstanceOf (   $expected,
  $attributeName,
  $classOrObject,
  $message = '' 
)
static

Asserts that an attribute is of a given type.

Parameters
string$expected
string$attributeName
mixed$classOrObject
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertAttributeInternalType (   $expected,
  $attributeName,
  $classOrObject,
  $message = '' 
)
static

Asserts that an attribute is of a given type.

Parameters
string$expected
string$attributeName
mixed$classOrObject
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertAttributeLessThan (   $expected,
  $actualAttributeName,
  $actualClassOrObject,
  $message = '' 
)
static

Asserts that an attribute is smaller than another value.

Parameters
mixed$expected
string$actualAttributeName
string$actualClassOrObject
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertAttributeLessThanOrEqual (   $expected,
  $actualAttributeName,
  $actualClassOrObject,
  $message = '' 
)
static

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

Parameters
mixed$expected
string$actualAttributeName
string$actualClassOrObject
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertAttributeNotContains (   $needle,
  $haystackAttributeName,
  $haystackClassOrObject,
  $message = '',
  $ignoreCase = false,
  $checkForObjectIdentity = true,
  $checkForNonObjectIdentity = false 
)
static

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.

Parameters
mixed$needle
string$haystackAttributeName
mixed$haystackClassOrObject
string$message
bool$ignoreCase
bool$checkForObjectIdentity
bool$checkForNonObjectIdentity
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::assertAttributeNotContainsOnly (   $type,
  $haystackAttributeName,
  $haystackClassOrObject,
  $isNativeType = null,
  $message = '' 
)
static

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.

Parameters
string$type
string$haystackAttributeName
mixed$haystackClassOrObject
bool$isNativeType
string$message
Since
Method available since Release 3.1.4
static PHPUnit_Framework_Assert::assertAttributeNotCount (   $expectedCount,
  $haystackAttributeName,
  $haystackClassOrObject,
  $message = '' 
)
static

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

Parameters
int$expectedCount
string$haystackAttributeName
mixed$haystackClassOrObject
string$message
Since
Method available since Release 3.6.0
static PHPUnit_Framework_Assert::assertAttributeNotEmpty (   $haystackAttributeName,
  $haystackClassOrObject,
  $message = '' 
)
static

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

Parameters
string$haystackAttributeName
mixed$haystackClassOrObject
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertAttributeNotEquals (   $expected,
  $actualAttributeName,
  $actualClassOrObject,
  $message = '',
  $delta = 0.0,
  $maxDepth = 10,
  $canonicalize = false,
  $ignoreCase = false 
)
static

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

Parameters
mixed$expected
string$actualAttributeName
string$actualClassOrObject
string$message
float$delta
int$maxDepth
bool$canonicalize
bool$ignoreCase
static PHPUnit_Framework_Assert::assertAttributeNotInstanceOf (   $expected,
  $attributeName,
  $classOrObject,
  $message = '' 
)
static

Asserts that an attribute is of a given type.

Parameters
string$expected
string$attributeName
mixed$classOrObject
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertAttributeNotInternalType (   $expected,
  $attributeName,
  $classOrObject,
  $message = '' 
)
static

Asserts that an attribute is of a given type.

Parameters
string$expected
string$attributeName
mixed$classOrObject
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertAttributeNotSame (   $expected,
  $actualAttributeName,
  $actualClassOrObject,
  $message = '' 
)
static

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

Parameters
mixed$expected
string$actualAttributeName
object$actualClassOrObject
string$message
static PHPUnit_Framework_Assert::assertAttributeSame (   $expected,
  $actualAttributeName,
  $actualClassOrObject,
  $message = '' 
)
static

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

Parameters
mixed$expected
string$actualAttributeName
object$actualClassOrObject
string$message
static PHPUnit_Framework_Assert::assertClassHasAttribute (   $attributeName,
  $className,
  $message = '' 
)
static

Asserts that a class has a specified attribute.

Parameters
string$attributeName
string$className
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertClassHasStaticAttribute (   $attributeName,
  $className,
  $message = '' 
)
static

Asserts that a class has a specified static attribute.

Parameters
string$attributeName
string$className
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertClassNotHasAttribute (   $attributeName,
  $className,
  $message = '' 
)
static

Asserts that a class does not have a specified attribute.

Parameters
string$attributeName
string$className
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertClassNotHasStaticAttribute (   $attributeName,
  $className,
  $message = '' 
)
static

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

Parameters
string$attributeName
string$className
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertContains (   $needle,
  $haystack,
  $message = '',
  $ignoreCase = false,
  $checkForObjectIdentity = true,
  $checkForNonObjectIdentity = false 
)
static

Asserts that a haystack contains a needle.

Parameters
mixed$needle
mixed$haystack
string$message
bool$ignoreCase
bool$checkForObjectIdentity
bool$checkForNonObjectIdentity
Since
Method available since Release 2.1.0
static PHPUnit_Framework_Assert::assertContainsOnly (   $type,
  $haystack,
  $isNativeType = null,
  $message = '' 
)
static

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

Parameters
string$type
mixed$haystack
bool$isNativeType
string$message
Since
Method available since Release 3.1.4
static PHPUnit_Framework_Assert::assertContainsOnlyInstancesOf (   $classname,
  $haystack,
  $message = '' 
)
static

Asserts that a haystack contains only instances of a given classname

Parameters
string$classname
array | Traversable$haystack
string$message
static PHPUnit_Framework_Assert::assertCount (   $expectedCount,
  $haystack,
  $message = '' 
)
static

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

Parameters
int$expectedCount
mixed$haystack
string$message
static PHPUnit_Framework_Assert::assertEmpty (   $actual,
  $message = '' 
)
static

Asserts that a variable is empty.

Parameters
mixed$actual
string$message
Exceptions
PHPUnit_Framework_AssertionFailedError
static PHPUnit_Framework_Assert::assertEquals (   $expected,
  $actual,
  $message = '',
  $delta = 0.0,
  $maxDepth = 10,
  $canonicalize = false,
  $ignoreCase = false 
)
static

Asserts that two variables are equal.

Parameters
mixed$expected
mixed$actual
string$message
float$delta
int$maxDepth
bool$canonicalize
bool$ignoreCase
static PHPUnit_Framework_Assert::assertEqualXMLStructure ( DOMElement  $expectedElement,
DOMElement  $actualElement,
  $checkAttributes = false,
  $message = '' 
)
static

Asserts that a hierarchy of DOMElements matches.

Parameters
DOMElement$expectedElement
DOMElement$actualElement
bool$checkAttributes
string$message
Since
Method available since Release 3.3.0
static PHPUnit_Framework_Assert::assertFalse (   $condition,
  $message = '' 
)
static

Asserts that a condition is false.

Parameters
bool$condition
string$message
Exceptions
PHPUnit_Framework_AssertionFailedError
static PHPUnit_Framework_Assert::assertFileEquals (   $expected,
  $actual,
  $message = '',
  $canonicalize = false,
  $ignoreCase = false 
)
static

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

Parameters
string$expected
string$actual
string$message
bool$canonicalize
bool$ignoreCase
Since
Method available since Release 3.2.14
static PHPUnit_Framework_Assert::assertFileExists (   $filename,
  $message = '' 
)
static

Asserts that a file exists.

Parameters
string$filename
string$message
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::assertFileNotEquals (   $expected,
  $actual,
  $message = '',
  $canonicalize = false,
  $ignoreCase = false 
)
static

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

Parameters
string$expected
string$actual
string$message
bool$canonicalize
bool$ignoreCase
Since
Method available since Release 3.2.14
static PHPUnit_Framework_Assert::assertFileNotExists (   $filename,
  $message = '' 
)
static

Asserts that a file does not exist.

Parameters
string$filename
string$message
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::assertGreaterThan (   $expected,
  $actual,
  $message = '' 
)
static

Asserts that a value is greater than another value.

Parameters
mixed$expected
mixed$actual
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertGreaterThanOrEqual (   $expected,
  $actual,
  $message = '' 
)
static

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

Parameters
mixed$expected
mixed$actual
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertInstanceOf (   $expected,
  $actual,
  $message = '' 
)
static

Asserts that a variable is of a given type.

Parameters
string$expected
mixed$actual
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertInternalType (   $expected,
  $actual,
  $message = '' 
)
static

Asserts that a variable is of a given type.

Parameters
string$expected
mixed$actual
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertJson (   $actualJson,
  $message = '' 
)
static

Asserts that a string is a valid JSON string.

Parameters
string$actualJson
string$message
Since
Method available since Release 3.7.20
static PHPUnit_Framework_Assert::assertJsonFileEqualsJsonFile (   $expectedFile,
  $actualFile,
  $message = '' 
)
static

Asserts that two JSON files are equal.

Parameters
string$expectedFile
string$actualFile
string$message
static PHPUnit_Framework_Assert::assertJsonFileNotEqualsJsonFile (   $expectedFile,
  $actualFile,
  $message = '' 
)
static

Asserts that two JSON files are not equal.

Parameters
string$expectedFile
string$actualFile
string$message
static PHPUnit_Framework_Assert::assertJsonStringEqualsJsonFile (   $expectedFile,
  $actualJson,
  $message = '' 
)
static

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

Parameters
string$expectedFile
string$actualJson
string$message
static PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString (   $expectedJson,
  $actualJson,
  $message = '' 
)
static

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

Parameters
string$expectedJson
string$actualJson
string$message
static PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonFile (   $expectedFile,
  $actualJson,
  $message = '' 
)
static

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

Parameters
string$expectedFile
string$actualJson
string$message
static PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonString (   $expectedJson,
  $actualJson,
  $message = '' 
)
static

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

Parameters
string$expectedJson
string$actualJson
string$message
static PHPUnit_Framework_Assert::assertLessThan (   $expected,
  $actual,
  $message = '' 
)
static

Asserts that a value is smaller than another value.

Parameters
mixed$expected
mixed$actual
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertLessThanOrEqual (   $expected,
  $actual,
  $message = '' 
)
static

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

Parameters
mixed$expected
mixed$actual
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertNotContains (   $needle,
  $haystack,
  $message = '',
  $ignoreCase = false,
  $checkForObjectIdentity = true,
  $checkForNonObjectIdentity = false 
)
static

Asserts that a haystack does not contain a needle.

Parameters
mixed$needle
mixed$haystack
string$message
bool$ignoreCase
bool$checkForObjectIdentity
bool$checkForNonObjectIdentity
Since
Method available since Release 2.1.0
static PHPUnit_Framework_Assert::assertNotContainsOnly (   $type,
  $haystack,
  $isNativeType = null,
  $message = '' 
)
static

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

Parameters
string$type
mixed$haystack
bool$isNativeType
string$message
Since
Method available since Release 3.1.4
static PHPUnit_Framework_Assert::assertNotCount (   $expectedCount,
  $haystack,
  $message = '' 
)
static

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

Parameters
int$expectedCount
mixed$haystack
string$message
static PHPUnit_Framework_Assert::assertNotEmpty (   $actual,
  $message = '' 
)
static

Asserts that a variable is not empty.

Parameters
mixed$actual
string$message
Exceptions
PHPUnit_Framework_AssertionFailedError
static PHPUnit_Framework_Assert::assertNotEquals (   $expected,
  $actual,
  $message = '',
  $delta = 0.0,
  $maxDepth = 10,
  $canonicalize = false,
  $ignoreCase = false 
)
static

Asserts that two variables are not equal.

Parameters
mixed$expected
mixed$actual
string$message
float$delta
int$maxDepth
bool$canonicalize
bool$ignoreCase
Since
Method available since Release 2.3.0
static PHPUnit_Framework_Assert::assertNotFalse (   $condition,
  $message = '' 
)
static

Asserts that a condition is not false.

Parameters
bool$condition
string$message
Exceptions
PHPUnit_Framework_AssertionFailedError
static PHPUnit_Framework_Assert::assertNotInstanceOf (   $expected,
  $actual,
  $message = '' 
)
static

Asserts that a variable is not of a given type.

Parameters
string$expected
mixed$actual
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertNotInternalType (   $expected,
  $actual,
  $message = '' 
)
static

Asserts that a variable is not of a given type.

Parameters
string$expected
mixed$actual
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertNotNull (   $actual,
  $message = '' 
)
static

Asserts that a variable is not null.

Parameters
mixed$actual
string$message
static PHPUnit_Framework_Assert::assertNotRegExp (   $pattern,
  $string,
  $message = '' 
)
static

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

Parameters
string$pattern
string$string
string$message
Since
Method available since Release 2.1.0
static PHPUnit_Framework_Assert::assertNotSame (   $expected,
  $actual,
  $message = '' 
)
static

Asserts that two variables do not have the same type and value. Used on objects, it asserts that two variables do not reference the same object.

Parameters
mixed$expected
mixed$actual
string$message
static PHPUnit_Framework_Assert::assertNotSameSize (   $expected,
  $actual,
  $message = '' 
)
static

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

Parameters
array | Countable | Traversable$expected
array | Countable | Traversable$actual
string$message
static PHPUnit_Framework_Assert::assertNotTag (   $matcher,
  $actual,
  $message = '',
  $isHtml = true 
)
static

This assertion is the exact opposite of assertTag().

Rather than asserting that $matcher results in a match, it asserts that $matcher does not match.

Parameters
array$matcher
string$actual
string$message
bool$isHtml
Since
Method available since Release 3.3.0
Deprecated:
static PHPUnit_Framework_Assert::assertNotTrue (   $condition,
  $message = '' 
)
static

Asserts that a condition is not true.

Parameters
bool$condition
string$message
Exceptions
PHPUnit_Framework_AssertionFailedError
static PHPUnit_Framework_Assert::assertNull (   $actual,
  $message = '' 
)
static

Asserts that a variable is null.

Parameters
mixed$actual
string$message
static PHPUnit_Framework_Assert::assertObjectHasAttribute (   $attributeName,
  $object,
  $message = '' 
)
static

Asserts that an object has a specified attribute.

Parameters
string$attributeName
object$object
string$message
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::assertObjectNotHasAttribute (   $attributeName,
  $object,
  $message = '' 
)
static

Asserts that an object does not have a specified attribute.

Parameters
string$attributeName
object$object
string$message
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::assertRegExp (   $pattern,
  $string,
  $message = '' 
)
static

Asserts that a string matches a given regular expression.

Parameters
string$pattern
string$string
string$message
static PHPUnit_Framework_Assert::assertSame (   $expected,
  $actual,
  $message = '' 
)
static

Asserts that two variables have the same type and value. Used on objects, it asserts that two variables reference the same object.

Parameters
mixed$expected
mixed$actual
string$message
static PHPUnit_Framework_Assert::assertSameSize (   $expected,
  $actual,
  $message = '' 
)
static

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

Parameters
array | Countable | Traversable$expected
array | Countable | Traversable$actual
string$message
static PHPUnit_Framework_Assert::assertSelectCount (   $selector,
  $count,
  $actual,
  $message = '',
  $isHtml = true 
)
static

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

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
array$selector
int | bool | array$count
mixed$actual
string$message
bool$isHtml
Since
Method available since Release 3.3.0
Deprecated:
static PHPUnit_Framework_Assert::assertSelectEquals (   $selector,
  $content,
  $count,
  $actual,
  $message = '',
  $isHtml = true 
)
static

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

Parameters
array$selector
string$content
int | bool | array$count
mixed$actual
string$message
bool$isHtml
Since
Method available since Release 3.3.0
Deprecated:
static PHPUnit_Framework_Assert::assertSelectRegExp (   $selector,
  $pattern,
  $count,
  $actual,
  $message = '',
  $isHtml = true 
)
static

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

Parameters
array$selector
string$pattern
int | bool | array$count
mixed$actual
string$message
bool$isHtml
Since
Method available since Release 3.3.0
Deprecated:
static PHPUnit_Framework_Assert::assertStringEndsNotWith (   $suffix,
  $string,
  $message = '' 
)
static

Asserts that a string ends not with a given suffix.

Parameters
string$suffix
string$string
string$message
Since
Method available since Release 3.4.0
static PHPUnit_Framework_Assert::assertStringEndsWith (   $suffix,
  $string,
  $message = '' 
)
static

Asserts that a string ends with a given suffix.

Parameters
string$suffix
string$string
string$message
Since
Method available since Release 3.4.0
static PHPUnit_Framework_Assert::assertStringEqualsFile (   $expectedFile,
  $actualString,
  $message = '',
  $canonicalize = false,
  $ignoreCase = false 
)
static

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

Parameters
string$expectedFile
string$actualString
string$message
bool$canonicalize
bool$ignoreCase
Since
Method available since Release 3.3.0
static PHPUnit_Framework_Assert::assertStringMatchesFormat (   $format,
  $string,
  $message = '' 
)
static

Asserts that a string matches a given format string.

Parameters
string$format
string$string
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertStringMatchesFormatFile (   $formatFile,
  $string,
  $message = '' 
)
static

Asserts that a string matches a given format file.

Parameters
string$formatFile
string$string
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertStringNotEqualsFile (   $expectedFile,
  $actualString,
  $message = '',
  $canonicalize = false,
  $ignoreCase = false 
)
static

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

Parameters
string$expectedFile
string$actualString
string$message
bool$canonicalize
bool$ignoreCase
Since
Method available since Release 3.3.0
static PHPUnit_Framework_Assert::assertStringNotMatchesFormat (   $format,
  $string,
  $message = '' 
)
static

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

Parameters
string$format
string$string
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertStringNotMatchesFormatFile (   $formatFile,
  $string,
  $message = '' 
)
static

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

Parameters
string$formatFile
string$string
string$message
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::assertStringStartsNotWith (   $prefix,
  $string,
  $message = '' 
)
static

Asserts that a string starts not with a given prefix.

Parameters
string$prefix
string$string
string$message
Since
Method available since Release 3.4.0
static PHPUnit_Framework_Assert::assertStringStartsWith (   $prefix,
  $string,
  $message = '' 
)
static

Asserts that a string starts with a given prefix.

Parameters
string$prefix
string$string
string$message
Since
Method available since Release 3.4.0
static PHPUnit_Framework_Assert::assertTag (   $matcher,
  $actual,
  $message = '',
  $isHtml = true 
)
static

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

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
array$matcher
string$actual
string$message
bool$isHtml
Since
Method available since Release 3.3.0
Deprecated:
static PHPUnit_Framework_Assert::assertThat (   $value,
PHPUnit_Framework_Constraint  $constraint,
  $message = '' 
)
static

Evaluates a PHPUnit_Framework_Constraint matcher object.

Parameters
mixed$value
PHPUnit_Framework_Constraint$constraint
string$message
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::assertTrue (   $condition,
  $message = '' 
)
static

Asserts that a condition is true.

Parameters
bool$condition
string$message
Exceptions
PHPUnit_Framework_AssertionFailedError
static PHPUnit_Framework_Assert::assertXmlFileEqualsXmlFile (   $expectedFile,
  $actualFile,
  $message = '' 
)
static

Asserts that two XML files are equal.

Parameters
string$expectedFile
string$actualFile
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertXmlFileNotEqualsXmlFile (   $expectedFile,
  $actualFile,
  $message = '' 
)
static

Asserts that two XML files are not equal.

Parameters
string$expectedFile
string$actualFile
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertXmlStringEqualsXmlFile (   $expectedFile,
  $actualXml,
  $message = '' 
)
static

Asserts that two XML documents are equal.

Parameters
string$expectedFile
string$actualXml
string$message
Since
Method available since Release 3.3.0
static PHPUnit_Framework_Assert::assertXmlStringEqualsXmlString (   $expectedXml,
  $actualXml,
  $message = '' 
)
static

Asserts that two XML documents are equal.

Parameters
string$expectedXml
string$actualXml
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlFile (   $expectedFile,
  $actualXml,
  $message = '' 
)
static

Asserts that two XML documents are not equal.

Parameters
string$expectedFile
string$actualXml
string$message
Since
Method available since Release 3.3.0
static PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlString (   $expectedXml,
  $actualXml,
  $message = '' 
)
static

Asserts that two XML documents are not equal.

Parameters
string$expectedXml
string$actualXml
string$message
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::attribute ( PHPUnit_Framework_Constraint  $constraint,
  $attributeName 
)
static

Returns a PHPUnit_Framework_Constraint_Attribute matcher object.

Parameters
PHPUnit_Framework_Constraint$constraint
string$attributeName
Returns
PHPUnit_Framework_Constraint_Attribute
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::attributeEqualTo (   $attributeName,
  $value,
  $delta = 0.0,
  $maxDepth = 10,
  $canonicalize = false,
  $ignoreCase = false 
)
static

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

Parameters
string$attributeName
mixed$value
float$delta
int$maxDepth
bool$canonicalize
bool$ignoreCase
Returns
PHPUnit_Framework_Constraint_Attribute
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::callback (   $callback)
static

Returns a PHPUnit_Framework_Constraint_Callback matcher object.

Parameters
callable$callback
Returns
PHPUnit_Framework_Constraint_Callback
static PHPUnit_Framework_Assert::classHasAttribute (   $attributeName)
static

Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.

Parameters
string$attributeName
Returns
PHPUnit_Framework_Constraint_ClassHasAttribute
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::classHasStaticAttribute (   $attributeName)
static

Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher object.

Parameters
string$attributeName
Returns
PHPUnit_Framework_Constraint_ClassHasStaticAttribute
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::contains (   $value,
  $checkForObjectIdentity = true,
  $checkForNonObjectIdentity = false 
)
static

Returns a PHPUnit_Framework_Constraint_TraversableContains matcher object.

Parameters
mixed$value
bool$checkForObjectIdentity
bool$checkForNonObjectIdentity
Returns
PHPUnit_Framework_Constraint_TraversableContains
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::containsOnly (   $type)
static

Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher object.

Parameters
string$type
Returns
PHPUnit_Framework_Constraint_TraversableContainsOnly
Since
Method available since Release 3.1.4
static PHPUnit_Framework_Assert::containsOnlyInstancesOf (   $classname)
static
static PHPUnit_Framework_Assert::countOf (   $count)
static

Returns a PHPUnit_Framework_Constraint_Count matcher object.

Parameters
int$count
Returns
PHPUnit_Framework_Constraint_Count
static PHPUnit_Framework_Assert::equalTo (   $value,
  $delta = 0.0,
  $maxDepth = 10,
  $canonicalize = false,
  $ignoreCase = false 
)
static

Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.

Parameters
mixed$value
float$delta
int$maxDepth
bool$canonicalize
bool$ignoreCase
Returns
PHPUnit_Framework_Constraint_IsEqual
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::fail (   $message = '')
static

Fails a test with the given message.

Parameters
string$message
Exceptions
PHPUnit_Framework_AssertionFailedError
static PHPUnit_Framework_Assert::fileExists ( )
static

Returns a PHPUnit_Framework_Constraint_FileExists matcher object.

Returns
PHPUnit_Framework_Constraint_FileExists
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::getCount ( )
static

Return the current assertion count.

Returns
int
Since
Method available since Release 3.3.3
static PHPUnit_Framework_Assert::getObjectAttribute (   $object,
  $attributeName 
)
static

Returns the value of an object's attribute. This also works for attributes that are declared protected or private.

Parameters
object$object
string$attributeName
Returns
mixed
Exceptions
PHPUnit_Framework_Exception
Since
Method available since Release 4.0.0
static PHPUnit_Framework_Assert::getStaticAttribute (   $className,
  $attributeName 
)
static

Returns the value of a static attribute. This also works for attributes that are declared protected or private.

Parameters
string$className
string$attributeName
Returns
mixed
Exceptions
PHPUnit_Framework_Exception
Since
Method available since Release 4.0.0
static PHPUnit_Framework_Assert::greaterThan (   $value)
static

Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.

Parameters
mixed$value
Returns
PHPUnit_Framework_Constraint_GreaterThan
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::greaterThanOrEqual (   $value)
static

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

Parameters
mixed$value
Returns
PHPUnit_Framework_Constraint_Or
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::identicalTo (   $value)
static

Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.

Parameters
mixed$value
Returns
PHPUnit_Framework_Constraint_IsIdentical
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::isEmpty ( )
static

Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.

Returns
PHPUnit_Framework_Constraint_IsEmpty
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::isFalse ( )
static

Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.

Returns
PHPUnit_Framework_Constraint_IsFalse
Since
Method available since Release 3.3.0
static PHPUnit_Framework_Assert::isInstanceOf (   $className)
static

Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.

Parameters
string$className
Returns
PHPUnit_Framework_Constraint_IsInstanceOf
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::isJson ( )
static

Returns a PHPUnit_Framework_Constraint_IsJson matcher object.

Returns
PHPUnit_Framework_Constraint_IsJson
Since
Method available since Release 3.7.20
static PHPUnit_Framework_Assert::isNull ( )
static

Returns a PHPUnit_Framework_Constraint_IsNull matcher object.

Returns
PHPUnit_Framework_Constraint_IsNull
Since
Method available since Release 3.3.0
static PHPUnit_Framework_Assert::isTrue ( )
static

Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.

Returns
PHPUnit_Framework_Constraint_IsTrue
Since
Method available since Release 3.3.0
static PHPUnit_Framework_Assert::isType (   $type)
static

Returns a PHPUnit_Framework_Constraint_IsType matcher object.

Parameters
string$type
Returns
PHPUnit_Framework_Constraint_IsType
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::lessThan (   $value)
static

Returns a PHPUnit_Framework_Constraint_LessThan matcher object.

Parameters
mixed$value
Returns
PHPUnit_Framework_Constraint_LessThan
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::lessThanOrEqual (   $value)
static

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

Parameters
mixed$value
Returns
PHPUnit_Framework_Constraint_Or
Since
Method available since Release 3.1.0
static PHPUnit_Framework_Assert::logicalAnd ( )
static

Returns a PHPUnit_Framework_Constraint_And matcher object.

Returns
PHPUnit_Framework_Constraint_And
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::logicalNot ( PHPUnit_Framework_Constraint  $constraint)
static

Returns a PHPUnit_Framework_Constraint_Not matcher object.

Parameters
PHPUnit_Framework_Constraint$constraint
Returns
PHPUnit_Framework_Constraint_Not
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::logicalOr ( )
static

Returns a PHPUnit_Framework_Constraint_Or matcher object.

Returns
PHPUnit_Framework_Constraint_Or
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::logicalXor ( )
static

Returns a PHPUnit_Framework_Constraint_Xor matcher object.

Returns
PHPUnit_Framework_Constraint_Xor
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::markTestIncomplete (   $message = '')
static

Mark the test as incomplete.

Parameters
string$message
Exceptions
PHPUnit_Framework_IncompleteTestError
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::markTestSkipped (   $message = '')
static

Mark the test as skipped.

Parameters
string$message
Exceptions
PHPUnit_Framework_SkippedTestError
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::matches (   $string)
static

Returns a PHPUnit_Framework_Constraint_StringMatches matcher object.

Parameters
string$string
Returns
PHPUnit_Framework_Constraint_StringMatches
Since
Method available since Release 3.5.0
static PHPUnit_Framework_Assert::matchesRegularExpression (   $pattern)
static

Returns a PHPUnit_Framework_Constraint_PCREMatch matcher object.

Parameters
string$pattern
Returns
PHPUnit_Framework_Constraint_PCREMatch
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::objectHasAttribute (   $attributeName)
static

Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.

Parameters
string$attributeName
Returns
PHPUnit_Framework_Constraint_ObjectHasAttribute
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::readAttribute (   $classOrObject,
  $attributeName 
)
static

Returns the value of an attribute of a class or an object. This also works for attributes that are declared protected or private.

Parameters
mixed$classOrObject
string$attributeName
Returns
mixed
Exceptions
PHPUnit_Framework_Exception
static PHPUnit_Framework_Assert::resetCount ( )
static

Reset the assertion counter.

Since
Method available since Release 3.3.3
static PHPUnit_Framework_Assert::stringContains (   $string,
  $case = true 
)
static

Returns a PHPUnit_Framework_Constraint_StringContains matcher object.

Parameters
string$string
bool$case
Returns
PHPUnit_Framework_Constraint_StringContains
Since
Method available since Release 3.0.0
static PHPUnit_Framework_Assert::stringEndsWith (   $suffix)
static

Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.

Parameters
mixed$suffix
Returns
PHPUnit_Framework_Constraint_StringEndsWith
Since
Method available since Release 3.4.0
static PHPUnit_Framework_Assert::stringStartsWith (   $prefix)
static

Returns a PHPUnit_Framework_Constraint_StringStartsWith matcher object.

Parameters
mixed$prefix
Returns
PHPUnit_Framework_Constraint_StringStartsWith
Since
Method available since Release 3.4.0

The documentation for this class was generated from the following file: