is() public method

Indicates if two nodes are the same node.
public is ( Element | DOMNode $node ) : boolean
$node Element | DOMNode
return boolean
Exemplo n.º 1
0
 public function testIsException()
 {
     $this->setExpectedException('InvalidArgumentException');
     $domElement = $this->createDomElement('input');
     $element = new Element($domElement);
     $element->is(null);
 }
Exemplo n.º 2
0
 public function testIs()
 {
     $element = new Element('span', 'hello');
     $element2 = new Element('span', 'hello');
     $this->assertTrue($element->is($element));
     $this->assertFalse($element->is($element2));
 }
Exemplo n.º 3
0
 public function testCloneNode()
 {
     $element = new Element('input');
     $cloned = $element->cloneNode(true);
     $this->assertFalse($element->is($cloned));
 }
Exemplo n.º 4
0
 public function testIsException()
 {
     $this->setExpectedException('InvalidArgumentException');
     $element = new Element('span', 'hello');
     $element->is(null);
 }