PHP Class Sanpi\Behatch\Context\XmlContext

Inheritance: extends BaseContext
Show file Open project: behatch/contexts

Public Methods

Method Description
beforeScenario ( )
printLastXmlResponse ( ) Optimistically (ignoring errors) attempt to pretty-print the last XML response
theAtomFeedShouldBeValid ( )
theResponseShouldBeInXml ( ) Checks that the response is correct XML
theResponseShouldNotBeInXml ( ) Checks that the response is not correct XML
theRss2FeedShouldBeValid ( )
theXmlAttributeShouldBeEqualTo ( $attribute, $element, $text ) Checks that the XML attribute on the specified element is equal to the given value
theXmlAttributeShouldExist ( $attribute, $element ) Checks that the XML attribute on the specified element exists
theXmlAttributeShouldNotBeEqualTo ( $attribute, $element, $text ) Checks that the XML attribute on the specified element is not equal to the given value
theXmlAttributeShouldNotExist ( $attribute, $element ) Checks that the XML attribute on the specified element does not exist
theXmlElementShouldBeEqualTo ( $element, $text ) Checks that the specified XML element is equal to the given value
theXmlElementShouldContain ( $element, $text ) Checks that the given XML element contains the given value
theXmlElementShouldExist ( string $element ) : DomNodeList Checks that the specified XML element exists
theXmlElementShouldHaveNChildElements ( $element, $count ) Checks that the given XML element has N child element(s)
theXmlElementShouldNotBeEqualTo ( $element, $text ) Checks that the specified XML element is not equal to the given value
theXmlElementShouldNotContain ( $element, $text ) Checks that the given XML element does not contain the given value
theXmlElementShouldNotExist ( $element ) Checks that the specified XML element does not exist
theXmlFeedShouldBeValidAccordingToItsDtd ( )
theXmlFeedShouldBeValidAccordingToTheRelaxNgSchema ( $filename )
theXmlFeedShouldBeValidAccordingToTheXsd ( $filename )
theXmlFeedShouldBeValidAccordingToThisRelaxNgSchema ( Behat\Gherkin\Node\PyStringNode $ng )
theXmlFeedShouldBeValidAccordingToThisXsd ( Behat\Gherkin\Node\PyStringNode $xsd )
theXmlShouldNotUseTheNamespace ( $namespace ) Checks that the XML does not use the specified namespace
theXmlShouldUseTheNamespace ( $namespace ) Checks that the XML uses the specified namespace

Private Methods

Method Description
getDom ( )

Method Details

beforeScenario() public method

public beforeScenario ( )

printLastXmlResponse() public method

Optimistically (ignoring errors) attempt to pretty-print the last XML response

theAtomFeedShouldBeValid() public method

theResponseShouldBeInXml() public method

Checks that the response is correct XML

theResponseShouldNotBeInXml() public method

Checks that the response is not correct XML

theRss2FeedShouldBeValid() public method

theXmlAttributeShouldBeEqualTo() public method

Checks that the XML attribute on the specified element is equal to the given value
public theXmlAttributeShouldBeEqualTo ( $attribute, $element, $text )

theXmlAttributeShouldExist() public method

Checks that the XML attribute on the specified element exists
public theXmlAttributeShouldExist ( $attribute, $element )

theXmlAttributeShouldNotBeEqualTo() public method

Checks that the XML attribute on the specified element is not equal to the given value
public theXmlAttributeShouldNotBeEqualTo ( $attribute, $element, $text )

theXmlAttributeShouldNotExist() public method

Checks that the XML attribute on the specified element does not exist
public theXmlAttributeShouldNotExist ( $attribute, $element )

theXmlElementShouldBeEqualTo() public method

Checks that the specified XML element is equal to the given value
public theXmlElementShouldBeEqualTo ( $element, $text )

theXmlElementShouldContain() public method

Checks that the given XML element contains the given value
public theXmlElementShouldContain ( $element, $text )

theXmlElementShouldExist() public method

Checks that the specified XML element exists
public theXmlElementShouldExist ( string $element ) : DomNodeList
$element string
return DomNodeList

theXmlElementShouldHaveNChildElements() public method

Checks that the given XML element has N child element(s)
public theXmlElementShouldHaveNChildElements ( $element, $count )

theXmlElementShouldNotBeEqualTo() public method

Checks that the specified XML element is not equal to the given value
public theXmlElementShouldNotBeEqualTo ( $element, $text )

theXmlElementShouldNotContain() public method

Checks that the given XML element does not contain the given value
public theXmlElementShouldNotContain ( $element, $text )

theXmlElementShouldNotExist() public method

Checks that the specified XML element does not exist
public theXmlElementShouldNotExist ( $element )

theXmlFeedShouldBeValidAccordingToItsDtd() public method

theXmlFeedShouldBeValidAccordingToTheRelaxNgSchema() public method

theXmlFeedShouldBeValidAccordingToTheXsd() public method

theXmlFeedShouldBeValidAccordingToThisRelaxNgSchema() public method

public theXmlFeedShouldBeValidAccordingToThisRelaxNgSchema ( Behat\Gherkin\Node\PyStringNode $ng )
$ng Behat\Gherkin\Node\PyStringNode

theXmlFeedShouldBeValidAccordingToThisXsd() public method

public theXmlFeedShouldBeValidAccordingToThisXsd ( Behat\Gherkin\Node\PyStringNode $xsd )
$xsd Behat\Gherkin\Node\PyStringNode

theXmlShouldNotUseTheNamespace() public method

Checks that the XML does not use the specified namespace
public theXmlShouldNotUseTheNamespace ( $namespace )

theXmlShouldUseTheNamespace() public method

Checks that the XML uses the specified namespace
public theXmlShouldUseTheNamespace ( $namespace )