PHP Class ImboUnitTest\Http\Response\Formatter\XMLTest

Inheritance: extends PHPUnit_Framework_TestCase
Datei anzeigen Open project: imbo/imbo

Public Methods

Method Description
getStats ( ) : array[] Data provider for the stats model
setUp ( ) Set up the formatter
tearDown ( ) Tear down the formatter
testCanFormatAGroupModel ( )
testCanFormatAListModel ( )
testCanFormatAMetadataModel ( )
testCanFormatAMetadataModelWithNoMetadata ( )
testCanFormatAStatsModel ( $images, $users, $bytes, $customStats, $pattern )
testCanFormatAStatusModel ( )
testCanFormatAUserModel ( )
testCanFormatAccessRulesModel ( )
testCanFormatAnAccessRuleModelWithGroup ( )
testCanFormatAnAccessRuleModelWithResource ( )
testCanFormatAnArrayModel ( )
testCanFormatAnArrayModelWithNestedArrays ( )
testCanFormatAnEmptyArrayModel ( )
testCanFormatAnEmptyListModel ( )
testCanFormatAnErrorModel ( )
testCanFormatAnErrorModelWhenNoImageIdentifierExists ( )
testCanFormatAnImagesModel ( )
testCanFormatAnImagesModelWithNoImages ( )
testCanFormatAnImagesModelWithNoMetadata ( )
testCanFormatAnImagesModelWithNoMetadataSet ( )
testCanFormatAnImagesModelWithSomefields ( )
testCanFormatArrayModelWithLists ( )
testCanFormatArrayModelWithNestedLists ( )
testCanFormatGroupsModel ( )
testReturnsCurrectContentType ( )

Protected Methods

Method Description
assertXPathDoesNotMatch ( string $query, string $xml, string $message = '' ) Assert that an xpath query have no matches for the given XML tree
assertXPathMatches ( string $query, string $xml, string $message = '' ) Assert that an xpath query have matches for the given XML tree
queryXPath ( string $query, string $xml ) : DOMNodeList | null Run an XPath query on the given DOM document, returning matched elements

Method Details

assertXPathDoesNotMatch() protected method

Assert that an xpath query have no matches for the given XML tree
protected assertXPathDoesNotMatch ( string $query, string $xml, string $message = '' )
$query string XPath query
$xml string XML document
$message string

assertXPathMatches() protected method

Assert that an xpath query have matches for the given XML tree
protected assertXPathMatches ( string $query, string $xml, string $message = '' )
$query string XPath query
$xml string XML document
$message string

getStats() public method

Data provider for the stats model
public getStats ( ) : array[]
return array[]

queryXPath() protected method

Run an XPath query on the given DOM document, returning matched elements
protected queryXPath ( string $query, string $xml ) : DOMNodeList | null
$query string XPath query
$xml string XML document
return DOMNodeList | null

setUp() public method

Set up the formatter
public setUp ( )

tearDown() public method

Tear down the formatter
public tearDown ( )

testCanFormatAGroupModel() public method

testCanFormatAListModel() public method

testCanFormatAMetadataModel() public method

testCanFormatAMetadataModelWithNoMetadata() public method

testCanFormatAStatsModel() public method

public testCanFormatAStatsModel ( $images, $users, $bytes, $customStats, $pattern )

testCanFormatAStatusModel() public method

testCanFormatAUserModel() public method

testCanFormatAccessRulesModel() public method

testCanFormatAnAccessRuleModelWithGroup() public method

testCanFormatAnAccessRuleModelWithResource() public method

testCanFormatAnArrayModel() public method

testCanFormatAnArrayModelWithNestedArrays() public method

testCanFormatAnEmptyArrayModel() public method

testCanFormatAnEmptyListModel() public method

testCanFormatAnErrorModel() public method

testCanFormatAnErrorModelWhenNoImageIdentifierExists() public method

testCanFormatAnImagesModel() public method

testCanFormatAnImagesModelWithNoImages() public method

testCanFormatAnImagesModelWithNoMetadata() public method

testCanFormatAnImagesModelWithNoMetadataSet() public method

testCanFormatAnImagesModelWithSomefields() public method

testCanFormatArrayModelWithLists() public method

testCanFormatArrayModelWithNestedLists() public method

testCanFormatGroupsModel() public method

testReturnsCurrectContentType() public method