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

Public Member Functions

 __construct (PHPUnit_Framework_Test $test)
 
 toString ()
 
 basicRun (PHPUnit_Framework_TestResult $result)
 
 count ()
 
 getTest ()
 
 run (PHPUnit_Framework_TestResult $result=null)
 

Protected Member Functions

 createResult ()
 

Protected Attributes

 $test = null
 

Additional Inherited Members

- Static Public Member Functions inherited from PHPUnit_Framework_Assert
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 Decorator for Tests.

Use TestDecorator as the base class for defining new test decorators. Test decorator subclasses can be introduced to add behaviour before or after a test is run.

Since
Class available since Release 2.0.0

Constructor & Destructor Documentation

PHPUnit_Extensions_TestDecorator::__construct ( PHPUnit_Framework_Test  $test)

Constructor.

Parameters
PHPUnit_Framework_Test$test

Member Function Documentation

PHPUnit_Extensions_TestDecorator::basicRun ( PHPUnit_Framework_TestResult  $result)

Runs the test and collects the result in a TestResult.

Parameters
PHPUnit_Framework_TestResult$result
PHPUnit_Extensions_TestDecorator::count ( )

Counts the number of test cases that will be run by this test.

Returns
int

Implements Countable.

PHPUnit_Extensions_TestDecorator::createResult ( )
protected

Creates a default TestResult object.

Returns
PHPUnit_Framework_TestResult
PHPUnit_Extensions_TestDecorator::getTest ( )

Returns the test to be run.

Returns
PHPUnit_Framework_Test
PHPUnit_Extensions_TestDecorator::run ( PHPUnit_Framework_TestResult  $result = null)

Runs the decorated test and collects the result in a TestResult.

Parameters
PHPUnit_Framework_TestResult$result
Returns
PHPUnit_Framework_TestResult

Implements PHPUnit_Framework_Test.

PHPUnit_Extensions_TestDecorator::toString ( )

Returns a string representation of the test.

Returns
string

Implements PHPUnit_Framework_SelfDescribing.


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