is() публичный Метод

Indicates if two nodes are the same node.
public is ( Element | DOMNode $node ) : boolean
$node Element | DOMNode
Результат boolean
Пример #1
0
 public function testIsException()
 {
     $this->setExpectedException('InvalidArgumentException');
     $domElement = $this->createDomElement('input');
     $element = new Element($domElement);
     $element->is(null);
 }
Пример #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));
 }
Пример #3
0
 public function testCloneNode()
 {
     $element = new Element('input');
     $cloned = $element->cloneNode(true);
     $this->assertFalse($element->is($cloned));
 }
Пример #4
0
 public function testIsException()
 {
     $this->setExpectedException('InvalidArgumentException');
     $element = new Element('span', 'hello');
     $element->is(null);
 }