assertEqualXMLStructure() public static method

Asserts that a hierarchy of DOMElements matches.
public static assertEqualXMLStructure ( DOMElement $expectedElement, DOMElement $actualElement, boolean $checkAttributes = false, string $message = '' )
$expectedElement DOMElement
$actualElement DOMElement
$checkAttributes boolean
$message string
Ejemplo n.º 1
0
/**
 * Asserts that a hierarchy of DOMNodes matches.
 *
 * @param DOMNode $expectedNode
 * @param DOMNode $actualNode
 * @param boolean $checkAttributes
 * @param string  $message
 * @author Mattis Stordalen Flister <*****@*****.**>
 * @since  Method available since Release 3.3.0
 */
function assertEqualXMLStructure(DOMNode $expectedNode, DOMNode $actualNode, $checkAttributes = FALSE, $message = '')
{
    return PHPUnit_Framework_Assert::assertEqualXMLStructure($expectedNode, $actualNode, $checkAttributes, $message);
}
Ejemplo n.º 2
0
/**
 * Asserts that a hierarchy of DOMElements matches.
 *
 * @param DOMElement $expectedElement
 * @param DOMElement $actualElement
 * @param boolean $checkAttributes
 * @param string  $message
 * @author Mattis Stordalen Flister <*****@*****.**>
 * @since  Method available since Release 3.3.0
 */
function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, $checkAttributes = FALSE, $message = '')
{
    return PHPUnit_Framework_Assert::assertEqualXMLStructure($expectedElement, $actualElement, $checkAttributes, $message);
}
Ejemplo n.º 3
0
 /**
  * Expect that a hierarchy of DOMElements matches.
  *
  * @param DOMElement $expectedElement
  * @param bool $checkAttributes
  * @param string $message
  *
  * @return Expect
  */
 public function toHaveSameXMLStructureAs(DOMElement $expectedElement, $checkAttributes = false, $message = '')
 {
     Assert::assertEqualXMLStructure($expectedElement, $this->value, $checkAttributes, $message);
     return $this;
 }
Ejemplo n.º 4
0
 public function equalXMLStructure($xml, $checkAttributes = FALSE)
 {
     a::assertEqualXMLStructure($xml, $this->actual, $checkAttributes, $this->description);
 }
Ejemplo n.º 5
0
 /**
  * Asserts that a hierarchy of DOMElements matches and ensures attributes of structures also equals.
  *
  * @param DOMElement $expectedElement
  * @return $this
  */
 public function isEqualToXmlStructureAndItsAttributes(DOMElement $expectedElement)
 {
     $this->isInstanceOf(DOMElement::class);
     Assert::assertEqualXMLStructure($expectedElement, $this->actual, true, $this->description);
     return $this;
 }