/** * 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(); }
/** * @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); }