BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
Skins\Chameleon\Tests\Unit\Components\GenericComponentTestCase Class Reference
Inheritance diagram for Skins\Chameleon\Tests\Unit\Components\GenericComponentTestCase:
Collaboration diagram for Skins\Chameleon\Tests\Unit\Components\GenericComponentTestCase:

Public Member Functions

 getTestObject (\DOMElement $domElement=null)
 domElementProviderFromSyntheticLayoutFiles ()
 domElementProviderFromDeployedLayoutFiles ()
 assertValidHTML ($actual, $message= 'HTML text is not valid. ')
 getChameleonSkinTemplateStub ()
 getSuccessColor ()
 getNameOfComponentUnderTest ()
- Public Member Functions inherited from PHPUnit_Framework_TestCase
 __construct ($name=null, array $data=array(), $dataName= '')
 toString ()
 count ()
 getAnnotations ()
 getName ($withDataSet=true)
 getSize ()
 getActualOutput ()
 hasOutput ()
 expectOutputRegex ($expectedRegex)
 expectOutputString ($expectedString)
 hasPerformedExpectationsOnOutput ()
 hasExpectationOnOutput ()
 getExpectedException ()
 setExpectedException ($exceptionName, $exceptionMessage= '', $exceptionCode=null)
 setExpectedExceptionRegExp ($exceptionName, $exceptionMessageRegExp= '', $exceptionCode=null)
 setUseErrorHandler ($useErrorHandler)
 getStatus ()
 getStatusMessage ()
 hasFailed ()
 run (PHPUnit_Framework_TestResult $result=null)
 runBare ()
 setName ($name)
 setDependencies (array $dependencies)
 hasDependencies ()
 setDependencyInput (array $dependencyInput)
 setDisallowChangesToGlobalState ($disallowChangesToGlobalState)
 setBackupGlobals ($backupGlobals)
 setBackupStaticAttributes ($backupStaticAttributes)
 setRunTestInSeparateProcess ($runTestInSeparateProcess)
 setPreserveGlobalState ($preserveGlobalState)
 setInIsolation ($inIsolation)
 isInIsolation ()
 getResult ()
 setResult ($result)
 setOutputCallback ($callback)
 getTestResultObject ()
 setTestResultObject (PHPUnit_Framework_TestResult $result)
 getMock ($originalClassName, $methods=array(), array $arguments=array(), $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $cloneArguments=false, $callOriginalMethods=false, $proxyTarget=null)
 getMockBuilder ($className)
 getMockForAbstractClass ($originalClassName, array $arguments=array(), $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=array(), $cloneArguments=false)
 getMockForTrait ($traitName, array $arguments=array(), $mockClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $mockedMethods=array(), $cloneArguments=false)
 addToAssertionCount ($count)
 getNumAssertions ()

Static Public Member Functions

static assertTag ($matcher, $actual, $message= 'Failed asserting that the given fragment contained the described node.', $isHtml=true)
- Static Public Member Functions inherited from PHPUnit_Framework_TestCase
static any ()
static never ()
static atLeast ($requiredInvocations)
static atLeastOnce ()
static once ()
static exactly ($count)
static atMost ($allowedInvocations)
static at ($index)
static returnValue ($value)
static returnValueMap (array $valueMap)
static returnArgument ($argumentIndex)
static returnCallback ($callback)
static returnSelf ()
static throwException (Exception $exception)
static onConsecutiveCalls ()
static setUpBeforeClass ()
static tearDownAfterClass ()
- 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 ()

Protected Member Functions

 getDomElementsFromFile ($file)
- Protected Member Functions inherited from PHPUnit_Framework_TestCase
 setExpectedExceptionFromAnnotation ()
 setUseErrorHandlerFromAnnotation ()
 checkRequirements ()
 runTest ()
 verifyMockObjects ()
 iniSet ($varName, $newValue)
 setLocale ()
 getMockClass ($originalClassName, $methods=array(), array $arguments=array(), $mockClassName= '', $callOriginalConstructor=false, $callOriginalClone=true, $callAutoload=true, $cloneArguments=false)
 getMockFromWsdl ($wsdlFile, $originalClassName= '', $mockClassName= '', array $methods=array(), $callOriginalConstructor=true, array $options=array())
 getObjectForTrait ($traitName, array $arguments=array(), $traitClassName= '', $callOriginalConstructor=true, $callOriginalClone=true, $callAutoload=true, $cloneArguments=false)
 prophesize ($classOrInterface=null)
 getDataSetAsString ($includeData=true)
 createResult ()
 handleDependencies ()
 setUp ()
 assertPreConditions ()
 assertPostConditions ()
 tearDown ()
 onNotSuccessfulTest (Exception $e)
 prepareTemplate (Text_Template $template)
 getMockObjectGenerator ()

Static Protected Member Functions

static loadXML ($fragment, $isHtml=true)
static wrapHtmlFragment ($fragment)

Protected Attributes

- Protected Attributes inherited from PHPUnit_Framework_TestCase
 $backupGlobals = null
 $backupGlobalsBlacklist = array()
 $backupStaticAttributes = null
 $backupStaticAttributesBlacklist = array()
 $runTestInSeparateProcess = null
 $preserveGlobalState = true

Detailed Description

::<private> ::<protected>

skins-chameleon mediawiki-databaseless

Stephan Gambke

Member Function Documentation

static Skins\Chameleon\Tests\Unit\Components\GenericComponentTestCase::assertTag (   $matcher,
  $message = 'Failed asserting that the given fragment contained the described node.',
  $isHtml = true 

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

: Currently only supports 'tag' and 'class'

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.
  • class : The node's class attribute must contain the given value.
  • 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
Skins\Chameleon\Tests\Unit\Components\GenericComponentTestCase::assertValidHTML (   $actual,
  $message = 'HTML text is not valid. ' 

Asserts that $actual is a valid HTML fragment

Put this whole stuff in a and just call assertThat

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