is() public méthode

Indicates if two nodes are the same node.
public is ( Element | DOMNode $node ) : boolean
$node Element | DOMNode
Résultat boolean
Exemple #1
0
 public function testIsException()
 {
     $this->setExpectedException('InvalidArgumentException');
     $domElement = $this->createDomElement('input');
     $element = new Element($domElement);
     $element->is(null);
 }
Exemple #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));
 }
Exemple #3
0
 public function testCloneNode()
 {
     $element = new Element('input');
     $cloned = $element->cloneNode(true);
     $this->assertFalse($element->is($cloned));
 }
 public function testIsException()
 {
     $this->setExpectedException('InvalidArgumentException');
     $element = new Element('span', 'hello');
     $element->is(null);
 }