Add public keyword to methods
[MAILPOET-2413]
This commit is contained in:
@ -5,14 +5,14 @@ namespace MailPoet\Test\Util;
|
||||
use MailPoet\Util\pQuery\pQuery;
|
||||
|
||||
class PQueryTest extends \MailPoetUnitTest {
|
||||
function testBreakingQuoteAreNotRendered() {
|
||||
public function testBreakingQuoteAreNotRendered() {
|
||||
$html = '<a href="#" title="Escape " this"></a>';
|
||||
$domnode = pQuery::parseStr($html);
|
||||
$inner_text = $domnode->getInnerText();
|
||||
expect($inner_text)->equals("");
|
||||
}
|
||||
|
||||
function testQuotesAreCorrectlyEscaped() {
|
||||
public function testQuotesAreCorrectlyEscaped() {
|
||||
$html_characters = ['"', '"', '''];
|
||||
|
||||
foreach ($html_characters as $char) {
|
||||
@ -20,7 +20,7 @@ class PQueryTest extends \MailPoetUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
function testEncodedHtmlNamesAreDecoded() {
|
||||
public function testEncodedHtmlNamesAreDecoded() {
|
||||
$html_names = ['&', '<', '>', ' ', '¡', '¢', '£', '¤', '¥', '¦', '§', '¨', '©', 'ª', '«', '¬', '­', '®', '¯', '°', '±', '²', '³', '´', 'µ', '¶', '·', '¸', '¹', 'º', '»', '¼', '½', '¾', '¿', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', '×', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'Þ', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ð', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '÷', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'þ', 'ÿ'];
|
||||
|
||||
foreach ($html_names as $char) {
|
||||
@ -28,7 +28,7 @@ class PQueryTest extends \MailPoetUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
function testEncodedHtmlNumbersAreDecoded() {
|
||||
public function testEncodedHtmlNumbersAreDecoded() {
|
||||
// Tested numbers are from https://www.ascii.cl/htmlcodes.htm
|
||||
$html_numbers = array_merge(range(40, 126), range(160, 255), [32, 33, 35, 36, 37, 38, 338, 339, 352, 353, 376, 402, 8211, 8212, 8216, 8217, 8218, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8364, 8482]);
|
||||
|
||||
@ -37,7 +37,7 @@ class PQueryTest extends \MailPoetUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
function testItCanParseRealHtmlSnippets() {
|
||||
public function testItCanParseRealHtmlSnippets() {
|
||||
$snippets = [
|
||||
'<table width="100%" border="0" cellpadding="0" cellspacing="0" class="mailpoet_cols-one" style="border-spacing:0;mso-table-lspace:0;mso-table-rspace:0;table-layout:fixed;margin-left:auto;margin-right:auto;padding-left:0;padding-right:0;background-color:#ffffff;border-collapse:collapse" bgcolor="#ffffff"><tbody><tr><td class="mailpoet_header_footer_padded mailpoet_header" style="line-height:19.2px;text-align:center ;color:#222222 ;font-family:Arial ;font-size:12px ;border-collapse:collapse;padding:10px 20px"> <a href="http://littlespree.com?mailpoet_router&endpoint=track&action=click&data=WyIyMjIwIiwiZDE0Zjc3IiwiMTA4IiwiMTBiYjc1ZDhiZjgxIixmYWxzZV0" style="color:#6cb7d4 ;text-decoration:underline ">View this newsletter in your browser.</a></td></tr></tbody></table>',
|
||||
'<td class="mailpoet_spacer" height="30" valign="top" style="border-collapse:collapse"></td>',
|
||||
@ -55,7 +55,7 @@ class PQueryTest extends \MailPoetUnitTest {
|
||||
}
|
||||
}
|
||||
|
||||
function parseTest($html, $equals = true) {
|
||||
public function parseTest($html, $equals = true) {
|
||||
$parsed_html = pQuery::parseStr($html)->getInnerText();
|
||||
if ($equals) {
|
||||
expect($parsed_html)->equals($html);
|
||||
|
Reference in New Issue
Block a user