Fix deprecation warnings coming from pQuery library

[MAILPOET-3980]
This commit is contained in:
Rostislav Wolny
2021-12-01 14:07:09 +01:00
committed by Veljko V
parent 539f518f64
commit df6a955f0c
21 changed files with 84 additions and 67 deletions

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace pQuery; namespace MailPoetVendor\pQuery;
interface IQuery extends \Countable { interface IQuery extends \Countable {
/// Methods /// /// Methods ///

View File

@@ -7,7 +7,7 @@
* @package pQuery * @package pQuery
*/ */
namespace pQuery; namespace MailPoetVendor\pQuery;
/** /**
* Indents text * Indents text
@@ -216,7 +216,7 @@ class HtmlFormatter {
} }
if (trim($text)) { if (trim($text)) {
$text = \JSMinPlus::minify($text); $text = JSMinPlus::minify($text);
if ($wrap_comment) { if ($wrap_comment) {
$text = "<!--\n".$text."\n//-->"; $text = "<!--\n".$text."\n//-->";
} }

View File

@@ -7,7 +7,7 @@
* @package pQuery * @package pQuery
*/ */
namespace pQuery; namespace MailPoetVendor\pQuery;
/** /**
* Holds (x)html/xml tag information like tag name, attributes, * Holds (x)html/xml tag information like tag name, attributes,
@@ -65,14 +65,14 @@ class DomNode implements IQuery {
* @var string * @var string
* @see select() * @see select()
*/ */
var $selectClass = 'pQuery\\HtmlSelector'; var $selectClass = 'MailPoetVendor\\pQuery\\HtmlSelector';
/** /**
* Name of the parser class * Name of the parser class
* @var string * @var string
* @see setOuterText() * @see setOuterText()
* @see setInnerText() * @see setInnerText()
*/ */
var $parserClass = 'pQuery\\Html5Parser'; var $parserClass = 'MailPoetVendor\\pQuery\\Html5Parser';
/** /**
* Name of the class used for {@link addChild()} * Name of the class used for {@link addChild()}
@@ -83,37 +83,37 @@ class DomNode implements IQuery {
* Name of the class used for {@link addText()} * Name of the class used for {@link addText()}
* @var string * @var string
*/ */
var $childClass_Text = 'pQuery\\TextNode'; var $childClass_Text = 'MailPoetVendor\\pQuery\\TextNode';
/** /**
* Name of the class used for {@link addComment()} * Name of the class used for {@link addComment()}
* @var string * @var string
*/ */
var $childClass_Comment = 'pQuery\\CommentNode'; var $childClass_Comment = 'MailPoetVendor\\pQuery\\CommentNode';
/** /**
* Name of the class used for {@link addContional()} * Name of the class used for {@link addContional()}
* @var string * @var string
*/ */
var $childClass_Conditional = 'pQuery\\ConditionalTagNode'; var $childClass_Conditional = 'MailPoetVendor\\pQuery\\ConditionalTagNode';
/** /**
* Name of the class used for {@link addCDATA()} * Name of the class used for {@link addCDATA()}
* @var string * @var string
*/ */
var $childClass_CDATA = 'pQuery\\CdataNode'; var $childClass_CDATA = 'MailPoetVendor\\pQuery\\CdataNode';
/** /**
* Name of the class used for {@link addDoctype()} * Name of the class used for {@link addDoctype()}
* @var string * @var string
*/ */
var $childClass_Doctype = 'pQuery\\DoctypeNode'; var $childClass_Doctype = 'MailPoetVendor\\pQuery\\DoctypeNode';
/** /**
* Name of the class used for {@link addXML()} * Name of the class used for {@link addXML()}
* @var string * @var string
*/ */
var $childClass_XML = 'pQuery\\XmlNode'; var $childClass_XML = 'MailPoetVendor\\pQuery\\XmlNode';
/** /**
* Name of the class used for {@link addASP()} * Name of the class used for {@link addASP()}
* @var string * @var string
*/ */
var $childClass_ASP = 'pQuery\\AspEmbeddedNode'; var $childClass_ASP = 'MailPoetVendor\\pQuery\\AspEmbeddedNode';
/** /**
* Parent node, null if none * Parent node, null if none
@@ -311,7 +311,7 @@ class DomNode implements IQuery {
/** /**
* Class magic invoke method, performs {@link query()}. * Class magic invoke method, performs {@link query()}.
* @param string $query The css query to run on the nodes. * @param string $query The css query to run on the nodes.
* @return \pQuery * @return pQuery
*/ */
function __invoke($query = '*') { function __invoke($query = '*') {
return $this->query($query); return $this->query($query);
@@ -1922,7 +1922,7 @@ class DomNode implements IQuery {
*/ */
public function query($query = '*') { public function query($query = '*') {
$select = $this->select($query); $select = $this->select($query);
$result = new \pQuery((array)$select); $result = new pQuery((array)$select);
return $result; return $result;
} }
@@ -2352,7 +2352,7 @@ class DomNode implements IQuery {
return $this; return $this;
} }
public function count() { public function count(): int {
return 1; return 1;
} }
@@ -2852,4 +2852,4 @@ class AspEmbeddedNode extends EmbeddedNode {
#php4e #php4e
} }
?> ?>

View File

@@ -7,7 +7,7 @@
* @package pQuery * @package pQuery
*/ */
namespace pQuery; namespace MailPoetVendor\pQuery;
/** /**
* Parses a HTML document * Parses a HTML document
@@ -488,7 +488,7 @@ class HtmlParser extends HtmlParserBase {
* @internal If string, then it will create a new instance as root * @internal If string, then it will create a new instance as root
* @var DomNode * @var DomNode
*/ */
var $root = 'pQuery\\DomNode'; var $root = 'MailPoetVendor\\pQuery\\DomNode';
/** /**
* Current parsing hierarchy * Current parsing hierarchy
@@ -836,4 +836,4 @@ class Html5Parser extends HtmlParser {
} }
} }
?> ?>

View File

@@ -7,7 +7,7 @@
* @package pQuery * @package pQuery
*/ */
namespace pQuery; namespace MailPoetVendor\pQuery;
/** /**
* Tokenizes a css selector query * Tokenizes a css selector query
@@ -281,7 +281,7 @@ class HtmlSelector {
* @internal If string, then it will create a new instance as parser * @internal If string, then it will create a new instance as parser
* @var CSSQueryTokenizer * @var CSSQueryTokenizer
*/ */
var $parser = 'pQuery\\CSSQueryTokenizer'; var $parser = 'MailPoetVendor\\pQuery\\CSSQueryTokenizer';
/** /**
* Target of queries * Target of queries
@@ -945,5 +945,3 @@ class HtmlSelector {
return true; return true;
} }
} }
?>

View File

@@ -7,7 +7,7 @@
* @package pQuery * @package pQuery
*/ */
namespace pQuery; namespace MailPoetVendor\pQuery;
/** /**
* Converts a document into tokens * Converts a document into tokens
@@ -563,4 +563,4 @@ class TokenizerBase {
} }
} }
?> ?>

View File

@@ -7,7 +7,7 @@
* @package pQuery * @package pQuery
*/ */
namespace pQuery; namespace MailPoetVendor\pQuery;
/** /**
* Converts a XML document to an array * Converts a XML document to an array
@@ -98,4 +98,4 @@ class XML2ArrayParser extends HtmlParserBase {
} }
} }
?> ?>

View File

@@ -7,8 +7,8 @@
* @package pQuery * @package pQuery
*/ */
use pQuery\Html5Parser; use MailPoetVendor\pQuery\Html5Parser;
use pQuery\HtmlFormatter; use MailPoetVendor\pQuery\HtmlFormatter;
/** /**
* Returns HTML DOM from string * Returns HTML DOM from string
@@ -98,4 +98,4 @@ if (!defined('GANON_NO_INCLUDES')) {
} }
#! #!
?> ?>

View File

@@ -7,12 +7,13 @@
* @package pQuery * @package pQuery
*/ */
use pQuery\IQuery; namespace MailPoetVendor\pQuery;
/** /**
* A jQuery-like object for php. * A jQuery-like object for php.
*/ */
class pQuery implements ArrayAccess, IteratorAggregate, IQuery { class pQuery implements \ArrayAccess, \IteratorAggregate, IQuery {
/// Properties /// /// Properties ///
/** /**
@@ -78,15 +79,15 @@ class pQuery implements ArrayAccess, IteratorAggregate, IQuery {
* *
* @return int Returns the count of matched elements. * @return int Returns the count of matched elements.
*/ */
public function count() { public function count(): int {
return count($this->nodes); return count($this->nodes);
} }
/** /**
* Format/beautify a DOM. * Format/beautify a DOM.
* *
* @param pQuery\DomNode $dom The dom to format. * @param DomNode $dom The dom to format.
* @param array $options Extra formatting options. See {@link pQuery\HtmlFormatter::$options}. * @param array $options Extra formatting options. See {@link HtmlFormatter::$options}.
* @return bool Returns `true` on sucess and `false` on failure. * @return bool Returns `true` on sucess and `false` on failure.
*/ */
// public static function format($dom, $options = array()) { // public static function format($dom, $options = array()) {
@@ -94,8 +95,8 @@ class pQuery implements ArrayAccess, IteratorAggregate, IQuery {
// return $formatter->format($dom); // return $formatter->format($dom);
// } // }
public function getIterator() { public function getIterator(): \ArrayIterator {
return new ArrayIterator($this->nodes); return new \ArrayIterator($this->nodes);
} }
public function hasClass($classname) { public function hasClass($classname) {
@@ -118,15 +119,16 @@ class pQuery implements ArrayAccess, IteratorAggregate, IQuery {
return $this; return $this;
} }
public function offsetExists($offset) { public function offsetExists($offset): bool {
return isset($this->nodes[$offset]); return isset($this->nodes[$offset]);
} }
#[\ReturnTypeWillChange]
public function offsetGet($offset) { public function offsetGet($offset) {
return isset($this->nodes[$offset]) ? $this->nodes[$offset] : null; return isset($this->nodes[$offset]) ? $this->nodes[$offset] : null;
} }
public function offsetSet($offset, $value) { public function offsetSet($offset, $value): void {
if (is_null($offset) || !isset($this->nodes[$offset])) { if (is_null($offset) || !isset($this->nodes[$offset])) {
throw new \BadMethodCallException("You are not allowed to add new nodes to the pQuery object."); throw new \BadMethodCallException("You are not allowed to add new nodes to the pQuery object.");
@@ -135,7 +137,7 @@ class pQuery implements ArrayAccess, IteratorAggregate, IQuery {
} }
} }
public function offsetUnset($offset) { public function offsetUnset($offset): void {
if (isset($this->nodes[$offset])) { if (isset($this->nodes[$offset])) {
$this->nodes[$offset]->remove(); $this->nodes[$offset]->remove();
unset($this->nodes[$offset]); unset($this->nodes[$offset]);
@@ -147,7 +149,7 @@ class pQuery implements ArrayAccess, IteratorAggregate, IQuery {
* *
* @param string $path The path to the url. * @param string $path The path to the url.
* @param resource $context A context suitable to be passed into {@link file_get_contents} * @param resource $context A context suitable to be passed into {@link file_get_contents}
* @return pQuery\DomNode Returns the root dom node for the html file. * @return DomNode Returns the root dom node for the html file.
*/ */
public static function parseFile($path, $context = null) { public static function parseFile($path, $context = null) {
$html_str = file_get_contents($path, false, $context); $html_str = file_get_contents($path, false, $context);
@@ -158,10 +160,10 @@ class pQuery implements ArrayAccess, IteratorAggregate, IQuery {
* Query a string of html. * Query a string of html.
* *
* @param string $html * @param string $html
* @return pQuery\DomNode Returns the root dom node for the html string. * @return DomNode Returns the root dom node for the html string.
*/ */
public static function parseStr($html) { public static function parseStr($html) {
$parser = new pQuery\Html5Parser($html); $parser = new Html5Parser($html);
return $parser->root; return $parser->root;
} }

View File

@@ -1,5 +1,7 @@
<?php <?php
namespace MailPoetVendor\pQuery;
/** /**
* JSMinPlus version 1.4 * JSMinPlus version 1.4
* *

View File

@@ -14,7 +14,6 @@ class RequirementsChecker {
public $displayErrorNotice; public $displayErrorNotice;
public $vendorClasses = [ public $vendorClasses = [
'\pQuery',
'\Cron\CronExpression', '\Cron\CronExpression',
'\Html2Text\Html2Text', '\Html2Text\Html2Text',
]; ];

View File

@@ -3,8 +3,8 @@
namespace MailPoet\Newsletter\Editor; namespace MailPoet\Newsletter\Editor;
use MailPoet\Util\DOM as DOMUtil; use MailPoet\Util\DOM as DOMUtil;
use pQuery; use MailPoet\Util\pQuery\DomNode;
use pQuery\DomNode; use MailPoet\Util\pQuery\pQuery;
class StructureTransformer { class StructureTransformer {
public function transform($content, $imageFullWidth) { public function transform($content, $imageFullWidth) {

View File

@@ -2,7 +2,7 @@
namespace MailPoet\Util; namespace MailPoet\Util;
use pQuery\DomNode; use MailPoet\Util\pQuery\DomNode;
class DOM { class DOM {
/** /**

View File

@@ -2,8 +2,11 @@
namespace MailPoet\Util\pQuery; namespace MailPoet\Util\pQuery;
class DomNode extends \pQuery\DomNode { use MailPoetVendor\pQuery\DomNode as pQueryDomNode;
public $childClass = 'MailPoet\Util\pQuery\DomNode';
class DomNode extends pQueryDomNode {
public $childClass = DomNode::class;
public $parserClass = Html5Parser::class;
public function getInnerText() { public function getInnerText() {
return html_entity_decode($this->toString(true, true, 1), ENT_NOQUOTES, 'UTF-8'); return html_entity_decode($this->toString(true, true, 1), ENT_NOQUOTES, 'UTF-8');
@@ -12,4 +15,10 @@ class DomNode extends \pQuery\DomNode {
public function getOuterText() { public function getOuterText() {
return html_entity_decode($this->toString(), ENT_NOQUOTES, 'UTF-8'); return html_entity_decode($this->toString(), ENT_NOQUOTES, 'UTF-8');
} }
public function query($query = '*') {
$select = $this->select($query);
$result = new pQuery((array)$select);
return $result;
}
} }

View File

@@ -2,7 +2,9 @@
namespace MailPoet\Util\pQuery; namespace MailPoet\Util\pQuery;
class Html5Parser extends \pQuery\HtmlParser { use MailPoetVendor\pQuery\HtmlParser;
/** @var string|\pQuery\DomNode */
public $root = 'MailPoet\Util\pQuery\DomNode'; class Html5Parser extends HtmlParser {
/** @var string|DomNode */
public $root = DomNode::class;
} }

View File

@@ -2,13 +2,15 @@
namespace MailPoet\Util\pQuery; namespace MailPoet\Util\pQuery;
use MailPoetVendor\pQuery\pQuery as pQuerypQuery;
// extend pQuery class to use UTF-8 encoding when getting elements' inner/outer text // extend pQuery class to use UTF-8 encoding when getting elements' inner/outer text
// phpcs:ignore Squiz.Classes.ValidClassName // phpcs:ignore Squiz.Classes.ValidClassName
class pQuery extends \pQuery { class pQuery extends pQuerypQuery {
public static function parseStr($html) { public static function parseStr($html): DomNode {
$parser = new Html5Parser($html); $parser = new Html5Parser($html);
if (!$parser->root instanceof \pQuery\DomNode) { if (!$parser->root instanceof DomNode) {
// this condition shouldn't happen it is here only for PHPStan // this condition shouldn't happen it is here only for PHPStan
throw new \Exception('Renderer is not configured correctly'); throw new \Exception('Renderer is not configured correctly');
} }

View File

@@ -16,7 +16,7 @@ parameters:
ignoreErrors: ignoreErrors:
- '#Function members_register_.+ not found#' - '#Function members_register_.+ not found#'
- '#Call to an undefined method MailPoetVendor\\Idiorm\\IdiormResultSet::set\(\)#' - '#Call to an undefined method MailPoetVendor\\Idiorm\\IdiormResultSet::set\(\)#'
- '#Argument of an invalid type pQuery\\IQuery supplied for foreach, only iterables are supported#' - '#Argument of an invalid type MailPoetVendor\\pQuery\\IQuery supplied for foreach, only iterables are supported#'
- '/(with|has) no (return )?typehint specified/' # exclude level 6 errors - '/(with|has) no (return )?typehint specified/' # exclude level 6 errors
- # Primary keys ScheduledTaskSubscriberEntity of are foreign keys and foreign keys may be null because of missing related record - # Primary keys ScheduledTaskSubscriberEntity of are foreign keys and foreign keys may be null because of missing related record
message: '#Property MailPoet\\Entities\\[a-zA-Z]+::\$[a-z]+ type mapping mismatch: property can contain MailPoet\\Entities\\[a-zA-Z]+\|null but database expects MailPoet\\Entities\\[a-zA-Z]+.#' message: '#Property MailPoet\\Entities\\[a-zA-Z]+::\$[a-z]+ type mapping mismatch: property can contain MailPoet\\Entities\\[a-zA-Z]+\|null but database expects MailPoet\\Entities\\[a-zA-Z]+.#'

View File

@@ -12,6 +12,7 @@ use MailPoet\Models\Subscriber;
use MailPoet\Newsletter\Url; use MailPoet\Newsletter\Url;
use MailPoet\Router\Router; use MailPoet\Router\Router;
use MailPoet\Tasks\Sending as SendingTask; use MailPoet\Tasks\Sending as SendingTask;
use MailPoet\Util\pQuery\pQuery;
use MailPoet\WP\Functions as WPFunctions; use MailPoet\WP\Functions as WPFunctions;
use MailPoetVendor\Idiorm\ORM; use MailPoetVendor\Idiorm\ORM;
@@ -51,7 +52,7 @@ class ShortcodesTest extends \MailPoetTest {
// result contains a link pointing to the "view in browser" router endpoint // result contains a link pointing to the "view in browser" router endpoint
$result = $shortcodes->getArchive($params = false); $result = $shortcodes->getArchive($params = false);
WordPress::releaseFunction('apply_filters'); WordPress::releaseFunction('apply_filters');
$dom = \pQuery::parseStr($result); $dom = pQuery::parseStr($result);
$link = $dom->query('a'); $link = $dom->query('a');
/** @var string $link */ /** @var string $link */
$link = $link->attr('href'); $link = $link->attr('href');

View File

@@ -18,6 +18,7 @@ use MailPoet\Newsletter\Renderer\Preprocessor;
use MailPoet\Newsletter\Renderer\Renderer; use MailPoet\Newsletter\Renderer\Renderer;
use MailPoet\Services\Bridge; use MailPoet\Services\Bridge;
use MailPoet\Util\License\License; use MailPoet\Util\License\License;
use MailPoet\Util\pQuery\pQuery;
use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\MockObject\MockObject;
use WP_Error; use WP_Error;
@@ -60,7 +61,7 @@ class RendererTest extends \MailPoetTest {
$this->license $this->license
); );
$this->columnRenderer = new ColumnRenderer(); $this->columnRenderer = new ColumnRenderer();
$this->dOMParser = new \pQuery(); $this->dOMParser = new pQuery();
} }
public function testItRendersCompleteNewsletter() { public function testItRendersCompleteNewsletter() {

View File

@@ -35,7 +35,7 @@ class TextTest extends \MailPoetUnitTest {
$this->block['text'] = '<p>Text</p>'; $this->block['text'] = '<p>Text</p>';
$output = (new Text)->render($this->block); $output = (new Text)->render($this->block);
$table = $this->parser->parseStr($output)->query('table'); $table = $this->parser->parseStr($output)->query('table');
assert($table instanceof \pQuery); assert($table instanceof pQuery);
$paragraphTable = $table[0]->toString(); $paragraphTable = $table[0]->toString();
$expectedResult = '<table style="border-spacing:0;mso-table-lspace:0;mso-table-rspace:0;" width="100%" cellpadding="0"> $expectedResult = '<table style="border-spacing:0;mso-table-lspace:0;mso-table-rspace:0;" width="100%" cellpadding="0">
<tr> <tr>
@@ -53,7 +53,7 @@ class TextTest extends \MailPoetUnitTest {
'; ';
$output = (new Text)->render($this->block); $output = (new Text)->render($this->block);
$table = $this->parser->parseStr($output)->query('table'); $table = $this->parser->parseStr($output)->query('table');
assert($table instanceof \pQuery); assert($table instanceof pQuery);
$paragraphTable = $table[0]->toString(); $paragraphTable = $table[0]->toString();
$expectedResult = '<table style="border-spacing:0;mso-table-lspace:0;mso-table-rspace:0;" width="100%" cellpadding="0"> $expectedResult = '<table style="border-spacing:0;mso-table-lspace:0;mso-table-rspace:0;" width="100%" cellpadding="0">
<tr> <tr>
@@ -79,7 +79,7 @@ class TextTest extends \MailPoetUnitTest {
'; ';
$output = (new Text)->render($this->block); $output = (new Text)->render($this->block);
$table = $this->parser->parseStr($output)->query('table'); $table = $this->parser->parseStr($output)->query('table');
assert($table instanceof \pQuery); assert($table instanceof pQuery);
$paragraphTable = $table[0]->toString(); $paragraphTable = $table[0]->toString();
$expectedResult = '<table style="border-spacing:0;mso-table-lspace:0;mso-table-rspace:0;" width="100%" cellpadding="0"> $expectedResult = '<table style="border-spacing:0;mso-table-lspace:0;mso-table-rspace:0;" width="100%" cellpadding="0">
<tr> <tr>
@@ -89,7 +89,7 @@ class TextTest extends \MailPoetUnitTest {
</tr></table>'; </tr></table>';
expect($paragraphTable)->equals($expectedResult); expect($paragraphTable)->equals($expectedResult);
$heading = $this->parser->parseStr($output)->query('h1'); $heading = $this->parser->parseStr($output)->query('h1');
assert($heading instanceof \pQuery); assert($heading instanceof pQuery);
$heading = $heading[0]->toString(); $heading = $heading[0]->toString();
$expectedResult = '<h1 style="text-align:left;padding:0;font-style:normal;font-weight:normal;">Second</h1>'; $expectedResult = '<h1 style="text-align:left;padding:0;font-style:normal;font-weight:normal;">Second</h1>';
expect($heading)->equals($expectedResult); expect($heading)->equals($expectedResult);
@@ -99,7 +99,7 @@ class TextTest extends \MailPoetUnitTest {
$this->block['text'] = '<ul><li>Item 1</li><li>Item 2</li></ul>'; $this->block['text'] = '<ul><li>Item 1</li><li>Item 2</li></ul>';
$output = (new Text)->render($this->block); $output = (new Text)->render($this->block);
$ul = $this->parser->parseStr($output)->query('ul'); $ul = $this->parser->parseStr($output)->query('ul');
assert($ul instanceof \pQuery); assert($ul instanceof pQuery);
$list = $ul[0]->toString(); $list = $ul[0]->toString();
$expectedResult = '<ul class="mailpoet_paragraph" style="padding-top:0;padding-bottom:0;margin-top:10px;text-align:left;margin-bottom:10px;"><li class="mailpoet_paragraph" style="text-align:left;margin-bottom:10px;">Item 1</li><li class="mailpoet_paragraph" style="text-align:left;margin-bottom:10px;">Item 2</li></ul>'; $expectedResult = '<ul class="mailpoet_paragraph" style="padding-top:0;padding-bottom:0;margin-top:10px;text-align:left;margin-bottom:10px;"><li class="mailpoet_paragraph" style="text-align:left;margin-bottom:10px;">Item 1</li><li class="mailpoet_paragraph" style="text-align:left;margin-bottom:10px;">Item 2</li></ul>';
expect($list)->equals($expectedResult); expect($list)->equals($expectedResult);
@@ -109,7 +109,7 @@ class TextTest extends \MailPoetUnitTest {
$this->block['text'] = '<blockquote><p>Quote</p></blockquote>'; $this->block['text'] = '<blockquote><p>Quote</p></blockquote>';
$output = (new Text)->render($this->block); $output = (new Text)->render($this->block);
$table = $this->parser->parseStr($output)->query('table'); $table = $this->parser->parseStr($output)->query('table');
assert($table instanceof \pQuery); assert($table instanceof pQuery);
$blockquoteTable = $table[0]->toString(); $blockquoteTable = $table[0]->toString();
$expectedResult = '<table class="mailpoet_blockquote" width="100%" spacing="0" border="0" cellpadding="0"> $expectedResult = '<table class="mailpoet_blockquote" width="100%" spacing="0" border="0" cellpadding="0">
<tbody> <tbody>

View File

@@ -3,10 +3,11 @@
namespace MailPoet\Test\Util; namespace MailPoet\Test\Util;
use MailPoet\Util\DOM as DOMUtil; use MailPoet\Util\DOM as DOMUtil;
use pQuery; use MailPoet\Util\pQuery\DomNode;
use MailPoet\Util\pQuery\pQuery;
class DOMTest extends \MailPoetUnitTest { class DOMTest extends \MailPoetUnitTest {
/** @var pQuery\DomNode */ /** @var DomNode */
private $root; private $root;
public function _before() { public function _before() {