<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[52248] trunk/tests/phpunit/tests: Build/Test Tools: Correct the order and naming of expected and actual values in various tests.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/52248">52248</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/52248","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnbillion</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-11-25 19:39:31 +0000 (Thu, 25 Nov 2021)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Build/Test Tools: Correct the order and naming of expected and actual values in various tests.
This corrects the order of the parameters when used in assertions so if/when they fail the failure message is correct.
See <a href="https://core.trac.wordpress.org/ticket/53363">#53363</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsdbcharsetphp">trunk/tests/phpunit/tests/db/charset.php</a></li>
<li><a href="#trunktestsphpunittestsimageeditorphp">trunk/tests/phpunit/tests/image/editor.php</a></li>
<li><a href="#trunktestsphpunittestsimagefunctionsphp">trunk/tests/phpunit/tests/image/functions.php</a></li>
<li><a href="#trunktestsphpunittestsl10nloadTextdomainJustInTimephp">trunk/tests/phpunit/tests/l10n/loadTextdomainJustInTime.php</a></li>
<li><a href="#trunktestsphpunittestsl10nwpLocaleSwitcherphp">trunk/tests/phpunit/tests/l10n/wpLocaleSwitcher.php</a></li>
<li><a href="#trunktestsphpunittestsmenuwalkernavmenuphp">trunk/tests/phpunit/tests/menu/walker-nav-menu.php</a></li>
<li><a href="#trunktestsphpunittestsmetaregisterMetaphp">trunk/tests/phpunit/tests/meta/registerMeta.php</a></li>
<li><a href="#trunktestsphpunittestspostnavmenuphp">trunk/tests/phpunit/tests/post/nav-menu.php</a></li>
<li><a href="#trunktestsphpunittestsquerycommentCountphp">trunk/tests/phpunit/tests/query/commentCount.php</a></li>
<li><a href="#trunktestsphpunittestsrestapiwpRestMenuItemsControllerphp">trunk/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php</a></li>
<li><a href="#trunktestsphpunittestswidgetswpWidgetCustomHtmlphp">trunk/tests/phpunit/tests/widgets/wpWidgetCustomHtml.php</a></li>
<li><a href="#trunktestsphpunittestswidgetswpWidgetMediaphp">trunk/tests/phpunit/tests/widgets/wpWidgetMedia.php</a></li>
<li><a href="#trunktestsphpunittestswidgetswpWidgetMediaAudiophp">trunk/tests/phpunit/tests/widgets/wpWidgetMediaAudio.php</a></li>
<li><a href="#trunktestsphpunittestswidgetswpWidgetMediaImagephp">trunk/tests/phpunit/tests/widgets/wpWidgetMediaImage.php</a></li>
<li><a href="#trunktestsphpunittestswidgetswpWidgetMediaVideophp">trunk/tests/phpunit/tests/widgets/wpWidgetMediaVideo.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsdbcharsetphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/db/charset.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/db/charset.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/db/charset.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -767,10 +767,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> self::$_wpdb->query( $create );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $charset = self::$_wpdb->get_table_charset( $table );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $charset, $expected_charset );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected_charset, $charset );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $charset = self::$_wpdb->get_table_charset( strtoupper( $table ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $charset, $expected_charset );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected_charset, $charset );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> self::$_wpdb->query( $drop );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunktestsphpunittestsimageeditorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/image/editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/image/editor.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/image/editor.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -297,7 +297,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $file_data = wp_get_webp_info( $file );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $file_data, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $file_data );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunktestsphpunittestsimagefunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/image/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/image/functions.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/image/functions.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -626,7 +626,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $metadata = wp_generate_attachment_metadata( $attachment_id, $test_file );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertArrayHasKey( 'test-size', $metadata['sizes'], 'The `test-size` was not added to the metadata.' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $metadata['sizes']['test-size'], $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $metadata['sizes']['test-size'] );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> remove_image_size( 'test-size' );
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'fallback_intermediate_image_sizes', array( $this, 'filter_fallback_intermediate_image_sizes' ), 10 );
</span></span></pre></div>
<a id="trunktestsphpunittestsl10nloadTextdomainJustInTimephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/l10n/loadTextdomainJustInTime.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/l10n/loadTextdomainJustInTime.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/l10n/loadTextdomainJustInTime.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -69,13 +69,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once DIR_TESTDATA . '/plugins/internationalized-plugin.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $is_textdomain_loaded_before = is_textdomain_loaded( 'internationalized-plugin' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected_output = i18n_plugin_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual_output = i18n_plugin_test();
</ins><span class="cx" style="display: block; padding: 0 10px"> $is_textdomain_loaded_after = is_textdomain_loaded( 'internationalized-plugin' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $is_textdomain_loaded_before );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Das ist ein Dummy Plugin', $expected_output );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Das ist ein Dummy Plugin', $actual_output );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $is_textdomain_loaded_after );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -90,13 +90,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once get_stylesheet_directory() . '/functions.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $is_textdomain_loaded_before = is_textdomain_loaded( 'internationalized-theme' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected_output = i18n_theme_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual_output = i18n_theme_test();
</ins><span class="cx" style="display: block; padding: 0 10px"> $is_textdomain_loaded_after = is_textdomain_loaded( 'internationalized-theme' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $is_textdomain_loaded_before );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Das ist ein Dummy Theme', $expected_output );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Das ist ein Dummy Theme', $actual_output );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $is_textdomain_loaded_after );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -121,19 +121,19 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> require_once DIR_TESTDATA . '/plugins/internationalized-plugin.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected_output_before = i18n_plugin_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual_output_before = i18n_plugin_test();
</ins><span class="cx" style="display: block; padding: 0 10px"> $is_textdomain_loaded_before = is_textdomain_loaded( 'internationalized-plugin' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> unload_textdomain( 'internationalized-plugin' );
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected_output_after = i18n_plugin_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual_output_after = i18n_plugin_test();
</ins><span class="cx" style="display: block; padding: 0 10px"> $is_textdomain_loaded_after = is_textdomain_loaded( 'internationalized-plugin' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> load_textdomain( 'internationalized-plugin', WP_LANG_DIR . '/plugins/internationalized-plugin-de_DE.mo' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected_output_final = i18n_plugin_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual_output_final = i18n_plugin_test();
</ins><span class="cx" style="display: block; padding: 0 10px"> $is_textdomain_loaded_final = is_textdomain_loaded( 'internationalized-plugin' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> unload_textdomain( 'internationalized-plugin' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -140,15 +140,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'locale', array( $this, 'filter_set_locale_to_german' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Text domain loaded just in time.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Das ist ein Dummy Plugin', $expected_output_before );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Das ist ein Dummy Plugin', $actual_output_before );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $is_textdomain_loaded_before );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Text domain unloaded.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'This is a dummy plugin', $expected_output_after );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'This is a dummy plugin', $actual_output_after );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $is_textdomain_loaded_after );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Text domain loaded manually again.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Das ist ein Dummy Plugin', $expected_output_final );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Das ist ein Dummy Plugin', $actual_output_final );
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( $is_textdomain_loaded_final );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -159,10 +159,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once DIR_TESTDATA . '/plugins/internationalized-plugin.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch_to_locale( 'de_DE' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected = i18n_plugin_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual = i18n_plugin_test();
</ins><span class="cx" style="display: block; padding: 0 10px"> restore_previous_locale();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Das ist ein Dummy Plugin', $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Das ist ein Dummy Plugin', $actual );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -172,15 +172,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once DIR_TESTDATA . '/plugins/internationalized-plugin.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch_to_locale( 'de_DE' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected_de_de = i18n_plugin_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual_de_de = i18n_plugin_test();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch_to_locale( 'es_ES' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected_es_es = i18n_plugin_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual_es_es = i18n_plugin_test();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> restore_current_locale();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Das ist ein Dummy Plugin', $expected_de_de );
- $this->assertSame( 'This is a dummy plugin', $expected_es_es );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Das ist ein Dummy Plugin', $actual_de_de );
+ $this->assertSame( 'This is a dummy plugin', $actual_es_es );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -192,12 +192,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> require_once get_stylesheet_directory() . '/functions.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch_to_locale( 'de_DE' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected = i18n_theme_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual = i18n_theme_test();
</ins><span class="cx" style="display: block; padding: 0 10px"> restore_previous_locale();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch_theme( WP_DEFAULT_THEME );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Das ist ein Dummy Theme', $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Das ist ein Dummy Theme', $actual );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -209,9 +209,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> set_current_screen( 'dashboard' );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$user_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected = i18n_plugin_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual = i18n_plugin_test();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Das ist ein Dummy Plugin', $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Das ist ein Dummy Plugin', $actual );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -224,11 +224,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> require_once get_stylesheet_directory() . '/functions.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected = i18n_theme_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual = i18n_theme_test();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> switch_theme( WP_DEFAULT_THEME );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'Das ist ein Dummy Theme', $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'Das ist ein Dummy Theme', $actual );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunktestsphpunittestsl10nwpLocaleSwitcherphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/l10n/wpLocaleSwitcher.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/l10n/wpLocaleSwitcher.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/l10n/wpLocaleSwitcher.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -372,7 +372,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> switch_to_locale( 'de_DE' );
</span><span class="cx" style="display: block; padding: 0 10px"> switch_to_locale( $site_locale );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected = i18n_plugin_test();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual = i18n_plugin_test();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> restore_current_locale();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -379,7 +379,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_locale_switcher = $locale_switcher;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( 'en_US', get_locale() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( 'This is a dummy plugin', $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( 'This is a dummy plugin', $actual );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function filter_locale() {
</span></span></pre></div>
<a id="trunktestsphpunittestsmenuwalkernavmenuphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/menu/walker-nav-menu.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/menu/walker-nav-menu.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/menu/walker-nav-menu.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -41,7 +41,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 43290
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_noopener_no_referrer_for_target_blank() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expected = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $actual = '';
</ins><span class="cx" style="display: block; padding: 0 10px"> $post_id = $this->factory->post->create();
</span><span class="cx" style="display: block; padding: 0 10px"> $post_title = get_the_title( $post_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,9 +61,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'link_after' => '',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->walker->start_el( $expected, (object) $item, 0, (object) $args );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->walker->start_el( $actual, (object) $item, 0, (object) $args );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( "<li id=\"menu-item-{$post_id}\" class=\"menu-item-{$post_id}\"><a target=\"_blank\" rel=\"noopener\">{$post_title}</a>", $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( "<li id=\"menu-item-{$post_id}\" class=\"menu-item-{$post_id}\"><a target=\"_blank\" rel=\"noopener\">{$post_title}</a>", $actual );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunktestsphpunittestsmetaregisterMetaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/meta/registerMeta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/meta/registerMeta.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/meta/registerMeta.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -179,7 +179,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $actual, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $actual );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_register_meta_with_current_sanitize_callback_returns_true() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -521,11 +521,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $object_property_name = $object_type . '_id';
</span><span class="cx" style="display: block; padding: 0 10px"> $object_id = self::$$object_property_name;
</span><span class="cx" style="display: block; padding: 0 10px"> $default_value = get_metadata_default( $object_type, $object_id, $meta_key, $single );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $default_value, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $default_value );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Check for default value.
</span><span class="cx" style="display: block; padding: 0 10px"> $value = get_metadata( $object_type, $object_id, $meta_key, $single );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $value, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $value );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Set value to check default is not being returned by mistake.
</span><span class="cx" style="display: block; padding: 0 10px"> $meta_value = 'dibble';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -536,7 +536,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Delete meta, make sure the default is returned.
</span><span class="cx" style="display: block; padding: 0 10px"> delete_metadata( $object_type, $object_id, $meta_key );
</span><span class="cx" style="display: block; padding: 0 10px"> $value = get_metadata( $object_type, $object_id, $meta_key, $single );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $value, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $value );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Set other meta key, to make sure other keys are not effects.
</span><span class="cx" style="display: block; padding: 0 10px"> $meta_value = 'hibble';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -568,7 +568,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $object_property_name = $object_type . '_id';
</span><span class="cx" style="display: block; padding: 0 10px"> $object_id = self::$$object_property_name;
</span><span class="cx" style="display: block; padding: 0 10px"> $default_value = get_metadata_default( $object_type, $object_id, $meta_key, $single );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $default_value, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $default_value );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function filter_get_object_subtype_for_customtype( $subtype, $object_id ) {
</span></span></pre></div>
<a id="trunktestsphpunittestspostnavmenuphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/post/nav-menu.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/nav-menu.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/post/nav-menu.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -247,7 +247,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // And this is what we got when calling wp_get_nav_menus().
</span><span class="cx" style="display: block; padding: 0 10px"> $nav_menus_names = wp_list_pluck( wp_get_nav_menus(), 'name' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $nav_menus_names, $expected_nav_menus_names );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected_nav_menus_names, $nav_menus_names );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunktestsphpunittestsquerycommentCountphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/query/commentCount.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/query/commentCount.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/query/commentCount.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -81,7 +81,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = self::$post_ids[4];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_operator_greater_than() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,7 +99,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = self::$post_ids[5];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_operator_greater_than_no_results() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -117,7 +117,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_operator_less_than() {
</span><span class="cx" style="display: block; padding: 0 10px"> $args = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -143,7 +143,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected[] = $expected_id;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_operator_less_than_no_results() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -161,7 +161,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -189,7 +189,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected[] = $expected_id;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_operator_equal_or_greater_than() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -213,7 +213,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected[] = $expected_id;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_operator_equal_or_greater_than_no_results() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -231,7 +231,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_operator_equal_or_less_than() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -255,7 +255,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected[] = $expected_id;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_operator_equal_or_less_than_no_results() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -273,7 +273,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_invalid_operator_should_fall_back_on_equals() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -294,7 +294,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected[] = $expected_id;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wrong_count_no_results() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -312,7 +312,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_no_operator_no_results() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -329,7 +329,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = self::$post_ids[5];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_empty_non_numeric_string_should_be_ignored() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -353,7 +353,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected[] = $expected_id;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_simple_count() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -368,7 +368,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = self::$post_ids[5];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSameSets( $found_post_ids, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSameSets( $expected, $found_post_ids );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapiwpRestMenuItemsControllerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/rest-api/wpRestMenuItemsController.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -392,7 +392,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $expected[] = $i;
</span><span class="cx" style="display: block; padding: 0 10px"> $actual[] = $data['menu_order'];
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $actual, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $actual );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetswpWidgetCustomHtmlphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/widgets/wpWidgetCustomHtml.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/wpWidgetCustomHtml.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/widgets/wpWidgetCustomHtml.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -185,7 +185,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'content' => $instance['content'],
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $instance, array() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure KSES is applying as expected.
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'map_meta_cap', array( $this, 'grant_unfiltered_html_cap' ), 10, 2 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -193,7 +193,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $instance['content'] = '<script>alert( "Howdy!" );</script>';
</span><span class="cx" style="display: block; padding: 0 10px"> $expected['content'] = $instance['content'];
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $instance, array() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'map_meta_cap', array( $this, 'grant_unfiltered_html_cap' ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'map_meta_cap', array( $this, 'revoke_unfiltered_html_cap' ), 10, 2 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -201,7 +201,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $instance['content'] = '<script>alert( "Howdy!" );</script>';
</span><span class="cx" style="display: block; padding: 0 10px"> $expected['content'] = wp_kses_post( $instance['content'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $instance, array() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'map_meta_cap', array( $this, 'revoke_unfiltered_html_cap' ), 10 );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetswpWidgetMediaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/widgets/wpWidgetMedia.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/wpWidgetMedia.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/widgets/wpWidgetMedia.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -244,7 +244,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'attachment_id' => 1,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment ID.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -260,7 +260,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'url' => 'https://example.org',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment url.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -276,7 +276,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => 'What a title',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment title.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetswpWidgetMediaAudiophp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/widgets/wpWidgetMediaAudio.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/wpWidgetMediaAudio.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/widgets/wpWidgetMediaAudio.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -125,7 +125,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'attachment_id' => 1,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment ID.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -141,7 +141,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'url' => 'https://chickenandribs.org',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment url.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -158,7 +158,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'loop' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid loop setting.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -174,7 +174,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => 'An audio sample of parrots',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment title.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -190,7 +190,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'preload' => 'none',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid preload setting.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetswpWidgetMediaImagephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/widgets/wpWidgetMediaImage.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/wpWidgetMediaImage.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/widgets/wpWidgetMediaImage.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -132,7 +132,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'attachment_id' => 1,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment ID.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,7 +148,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'url' => 'https://example.org',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment url.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -165,7 +165,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => 'What a title',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment title.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -181,7 +181,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'size' => 'thumbnail',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid image size.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -197,7 +197,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'width' => 300,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid image width.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -213,7 +213,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'height' => 200,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid image height.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -229,7 +229,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'caption' => 'A caption with <a href="#">link</a>',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid image caption.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -250,7 +250,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'alt' => 'A water tower',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid alt text.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -271,7 +271,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'link_type' => 'file',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid link type.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -287,7 +287,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'link_url' => 'https://example.org',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid link url.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -304,7 +304,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'image_classes' => 'A water tower',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid image classes.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -325,7 +325,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'link_classes' => 'A water tower',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid link classes.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -346,7 +346,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'link_rel' => 'previous',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid rel text.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -367,7 +367,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'link_target_blank' => false,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid link target.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -383,7 +383,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'image_title' => 'What a title',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid image title.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetswpWidgetMediaVideophp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/widgets/wpWidgetMediaVideo.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/wpWidgetMediaVideo.php 2021-11-25 10:57:19 UTC (rev 52247)
+++ trunk/tests/phpunit/tests/widgets/wpWidgetMediaVideo.php 2021-11-25 19:39:31 UTC (rev 52248)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -126,7 +126,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'attachment_id' => 1,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment ID.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -142,7 +142,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'url' => 'https://chickenandribs.org',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment url.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -159,7 +159,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'loop' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid loop setting.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -175,7 +175,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'title' => 'A video of goats',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid attachment title.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -191,7 +191,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'preload' => 'none',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update( $expected, $instance );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->assertSame( $result, $expected );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->assertSame( $expected, $result );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Should filter invalid preload setting.
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $widget->update(
</span></span></pre>
</div>
</div>
</body>
</html>