Example #1
0
 /**
  * Apply Highlight to FluentDOM selection
  *
  * @return FluentDOM
  */
 public function highlight(FluentDOM $fd)
 {
     $fd->find('descendant-or-self::text()')->each(array($this, 'replace'));
     return $fd->spawn();
 }
Example #2
0
 /**
  * @group CoreFunctions
  * @covers FluentDOMCore::namespaces
  */
 public function testNamespacesWithChaining()
 {
     $fd = new FluentDOM();
     $fd->namespaces(array('test' => 'http://test.only/'));
     $fdChild = $fd->spawn();
     $this->assertAttributeEquals(array('test' => 'http://test.only/'), '_namespaces', $fdChild);
 }