Esempio n. 1
0
 /**
  * @group CoreFunctions
  * @covers FluentDOMCore::spawn
  */
 public function testSpawnWithElements()
 {
     $dom = new DOMDocument();
     $node = $dom->createElement('test');
     $dom->appendChild($node);
     $fdParent = new FluentDOMCore();
     $fdParent->load($dom);
     $fdChild = $fdParent->spawn($node);
     $this->assertAttributeSame(array($node), '_array', $fdChild);
 }
Esempio n. 2
0
 /**
  * Get children of the current iterator element
  *
  * @return object FluentDOMCore
  */
 public function getChildren()
 {
     $fd = $this->_owner->spawn();
     $fd->push($this->_owner->item($this->_position)->childNodes);
     return new self($fd);
 }
Esempio n. 3
0
 /**
  * @group CoreFunctions
  * @covers FluentDOMCore::spawn
  */
 public function testSpawn()
 {
     $fdParent = new FluentDOMCore();
     $fdChild = $fdParent->spawn();
     $this->assertAttributeSame($fdParent, '_parent', $fdChild);
 }