Exemplo n.º 1
0
 /**
  * Checks identity of two DOM elements.
  *
  * @param Element $element
  * @param Element $other
  */
 public function assertElementEquals(Element $element, Element $other)
 {
     if (!$element->equals($other)) {
         $message = __FUNCTION__ . ': Element id=' . $element->getId() . ' (tag = "' . $element->name() . '"' . (($htmlId = $element->attribute('id')) !== '' ? ", html id=\"{$htmlId}\"" : '') . ')' . ' does not equal to element id=' . $other->getId() . ' (tag = "' . $other->name() . '"' . (($htmlId = $other->attribute('id')) !== '' ? ", html id=\"{$htmlId}\"" : '') . ')' . '.';
         $this->fail($message);
     } else {
         $this->assertTrue(TRUE);
     }
 }