<!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>[48858] trunk/tests/phpunit/tests: Tests: Clean up some existing `@covers` tags.</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/48858">48858</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/48858","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-08-25 00:57:17 +0000 (Tue, 25 Aug 2020)</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'>Tests: Clean up some existing `@covers` tags.
The `()` at the end is unnecessary and disregarded by PHPUnit, so can be removed.
Props jrf.
See <a href="https://core.trac.wordpress.org/ticket/39265">#39265</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunktestsphpunittestsadminincludesTemplatephp">trunk/tests/phpunit/tests/admin/includesTemplate.php</a></li>
<li><a href="#trunktestsphpunittestsadminwpPrivacyRequestsTablephp">trunk/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php</a></li>
<li><a href="#trunktestsphpunittestsajaxCustomizeManagerphp">trunk/tests/phpunit/tests/ajax/CustomizeManager.php</a></li>
<li><a href="#trunktestsphpunittestsajaxCustomizeMenusphp">trunk/tests/phpunit/tests/ajax/CustomizeMenus.php</a></li>
<li><a href="#trunktestsphpunittestscustomizecustomcsssettingphp">trunk/tests/phpunit/tests/customize/custom-css-setting.php</a></li>
<li><a href="#trunktestsphpunittestscustomizemanagerphp">trunk/tests/phpunit/tests/customize/manager.php</a></li>
<li><a href="#trunktestsphpunittestscustomizenavmenuitemsettingphp">trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php</a></li>
<li><a href="#trunktestsphpunittestscustomizenavmenusphp">trunk/tests/phpunit/tests/customize/nav-menus.php</a></li>
<li><a href="#trunktestsphpunittestsdependenciesscriptsphp">trunk/tests/phpunit/tests/dependencies/scripts.php</a></li>
<li><a href="#trunktestsphpunittestsgeneralwpErrorphp">trunk/tests/phpunit/tests/general/wpError.php</a></li>
<li><a href="#trunktestsphpunittestspostnavmenuphp">trunk/tests/phpunit/tests/post/nav-menu.php</a></li>
<li><a href="#trunktestsphpunittestsposttypesphp">trunk/tests/phpunit/tests/post/types.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestblockrenderercontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestpostscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php</a></li>
<li><a href="#trunktestsphpunitteststhemephp">trunk/tests/phpunit/tests/theme.php</a></li>
<li><a href="#trunktestsphpunittestswidgetsmediaaudiowidgetphp">trunk/tests/phpunit/tests/widgets/media-audio-widget.php</a></li>
<li><a href="#trunktestsphpunittestswidgetsmediagallerywidgetphp">trunk/tests/phpunit/tests/widgets/media-gallery-widget.php</a></li>
<li><a href="#trunktestsphpunittestswidgetsmediaimagewidgetphp">trunk/tests/phpunit/tests/widgets/media-image-widget.php</a></li>
<li><a href="#trunktestsphpunittestswidgetsmediavideowidgetphp">trunk/tests/phpunit/tests/widgets/media-video-widget.php</a></li>
<li><a href="#trunktestsphpunittestswidgetsmediawidgetphp">trunk/tests/phpunit/tests/widgets/media-widget.php</a></li>
<li><a href="#trunktestsphpunittestswidgetstextwidgetphp">trunk/tests/phpunit/tests/widgets/text-widget.php</a></li>
<li><a href="#trunktestsphpunittestswidgetsphp">trunk/tests/phpunit/tests/widgets.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunktestsphpunittestsadminincludesTemplatephp"></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/admin/includesTemplate.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/includesTemplate.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/admin/includesTemplate.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -131,7 +131,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test calling get_settings_errors() with variations on where it gets errors from.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 42498
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::get_settings_errors()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_settings_errors
</ins><span class="cx" style="display: block; padding: 0 10px"> * @global array $wp_settings_errors
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_settings_errors_sources() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -171,7 +171,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"> * @ticket 44941
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::settings_errors()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::settings_errors
</ins><span class="cx" style="display: block; padding: 0 10px"> * @global array $wp_settings_errors
</span><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider settings_errors_css_classes_provider
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre></div>
<a id="trunktestsphpunittestsadminwpPrivacyRequestsTablephp"></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/admin/wpPrivacyRequestsTable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,7 +61,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $expected Expected in SQL query.
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> * @dataProvider data_test_columns_should_be_sortable
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Privacy_Requests_Table::prepare_items()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Privacy_Requests_Table::prepare_items
</ins><span class="cx" style="display: block; padding: 0 10px"> * @ticket 43960
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_columns_should_be_sortable( $order, $orderby, $search, $expected ) {
</span></span></pre></div>
<a id="trunktestsphpunittestsajaxCustomizeManagerphp"></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/ajax/CustomizeManager.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/ajax/CustomizeManager.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/ajax/CustomizeManager.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,7 +103,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::save().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_save_failures() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -270,7 +270,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::save().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_save_success_publish_create() {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_customize = $this->set_up_valid_state();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -299,7 +299,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::save().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_save_success_publish_edit() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uuid = wp_generate_uuid4();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -338,7 +338,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::save().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 38943
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_success_save_post_date() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uuid = wp_generate_uuid4();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -436,7 +436,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::save().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39896
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_save_autosave() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uuid = wp_generate_uuid4();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -482,7 +482,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test request for trashing a changeset.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39896
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::handle_changeset_trash_request()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::handle_changeset_trash_request
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_handle_changeset_trash_request() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uuid = wp_generate_uuid4();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -570,8 +570,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test request for dismissing autosave changesets.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39896
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::handle_dismiss_autosave_or_lock_request()
- * @covers WP_Customize_Manager::dismiss_user_auto_draft_changesets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::handle_dismiss_autosave_or_lock_request
+ * @covers WP_Customize_Manager::dismiss_user_auto_draft_changesets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_handle_dismiss_autosave_or_lock_request() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uuid = wp_generate_uuid4();
</span></span></pre></div>
<a id="trunktestsphpunittestsajaxCustomizeMenusphp"></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/ajax/CustomizeMenus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/ajax/CustomizeMenus.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/ajax/CustomizeMenus.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -608,7 +608,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Testing successful ajax_insert_auto_draft_post() call.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_ajax_insert_auto_draft_post_success() {
</span><span class="cx" style="display: block; padding: 0 10px"> $_POST = wp_slash(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -638,7 +638,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Testing unsuccessful ajax_insert_auto_draft_post() call.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_ajax_insert_auto_draft_failures() {
</span><span class="cx" style="display: block; padding: 0 10px"> // No nonce.
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizecustomcsssettingphp"></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/customize/custom-css-setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/custom-css-setting.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/customize/custom-css-setting.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -75,7 +75,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Also checks for the post type and the Setting Type.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Custom_CSS_Setting::__construct()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Custom_CSS_Setting::__construct
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_construct() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertTrue( post_type_exists( 'custom_css' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -106,9 +106,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test crud methods on WP_Customize_Custom_CSS_Setting.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @covers ::wp_get_custom_css
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Custom_CSS_Setting::value()
- * @covers WP_Customize_Custom_CSS_Setting::preview()
- * @covers WP_Customize_Custom_CSS_Setting::update()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Custom_CSS_Setting::value
+ * @covers WP_Customize_Custom_CSS_Setting::preview
+ * @covers WP_Customize_Custom_CSS_Setting::update
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_crud() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -266,7 +266,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test crud methods on WP_Customize_Custom_CSS_Setting.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Custom_CSS_Setting::value()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Custom_CSS_Setting::value
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_value_filter() {
</span><span class="cx" style="display: block; padding: 0 10px"> add_filter( 'customize_value_custom_css', array( $this, 'filter_value' ), 10, 2 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -306,7 +306,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test update filter on WP_Customize_Custom_CSS_Setting.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Custom_CSS_Setting::update()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Custom_CSS_Setting::update
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_update_filter() {
</span><span class="cx" style="display: block; padding: 0 10px"> $original_css = 'body { color:red; }';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -364,7 +364,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Note that the $validity \WP_Error object must be reset each time
</span><span class="cx" style="display: block; padding: 0 10px"> * as it picks up the Errors and passes them to the next assertion.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Custom_CSS_Setting::validate()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Custom_CSS_Setting::validate
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_validate() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizemanagerphp"></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/customize/manager.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/manager.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/customize/manager.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -106,7 +106,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::__construct().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::__construct()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::__construct
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_constructor() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uuid = wp_generate_uuid4();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -151,8 +151,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test constructor when deferring UUID.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39896
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::establish_loaded_changeset()
- * @covers WP_Customize_Manager::__construct()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::establish_loaded_changeset
+ * @covers WP_Customize_Manager::__construct
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_constructor_deferred_changeset_uuid() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$admin_user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -225,7 +225,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::setup_theme() for admin screen.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::setup_theme()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::setup_theme
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_setup_theme_in_customize_admin() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $pagenow, $wp_customize;
</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"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::setup_theme() for frontend.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::setup_theme()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::setup_theme
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_setup_theme_in_frontend() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize, $pagenow, $show_admin_bar;
</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"> * Test WP_Customize_Manager::settings_previewed().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39221
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::settings_previewed()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::settings_previewed
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_settings_previewed() {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_customize = new WP_Customize_Manager( array( 'settings_previewed' => false ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -343,7 +343,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::autosaved().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39896
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::autosaved()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::autosaved
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_autosaved() {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_customize = new WP_Customize_Manager();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -360,7 +360,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::branching().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39896
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::branching()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::branching
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_branching() {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_customize = new WP_Customize_Manager();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -382,7 +382,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::changeset_uuid().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::changeset_uuid()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::changeset_uuid
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_changeset_uuid() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uuid = wp_generate_uuid4();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -396,7 +396,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Ensure that post values are previewed even without being in preview.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::wp_loaded()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::wp_loaded
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_loaded() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$admin_user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -414,7 +414,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::find_changeset_post_id().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::find_changeset_post_id()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::find_changeset_post_id
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_find_changeset_post_id() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uuid = wp_generate_uuid4();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -439,7 +439,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::changeset_post_id().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::changeset_post_id()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::changeset_post_id
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_changeset_post_id() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uuid = wp_generate_uuid4();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -463,7 +463,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::changeset_data().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::changeset_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::changeset_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_changeset_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$admin_user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -539,8 +539,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::import_theme_starter_content().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::import_theme_starter_content()
- * @covers WP_Customize_Manager::_save_starter_content_changeset()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::import_theme_starter_content
+ * @covers WP_Customize_Manager::_save_starter_content_changeset
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_import_theme_starter_content() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$admin_user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -808,7 +808,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::import_theme_starter_content() with nested arrays.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 45484
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::import_theme_starter_content()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::import_theme_starter_content
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_import_theme_starter_content_with_nested_arrays() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$admin_user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -882,7 +882,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::customize_preview_init().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::customize_preview_init()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::customize_preview_init
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_customize_preview_init() {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -927,7 +927,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 40020
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::filter_iframe_security_headers()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::filter_iframe_security_headers
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_filter_iframe_security_headers() {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_customize = new WP_Customize_Manager();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -942,7 +942,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::add_state_query_params().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::add_state_query_params()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::add_state_query_params
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_add_state_query_params() {
</span><span class="cx" style="display: block; padding: 0 10px"> $preview_theme = $this->get_inactive_core_theme();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1001,7 +1001,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::save_changeset_post().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save_changeset_post()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save_changeset_post
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_save_changeset_post_without_theme_activation() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1243,7 +1243,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test saving changeset post without Kses or other content_save_pre filters mutating content.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save_changeset_post()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save_changeset_post
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_save_changeset_post_without_kses_corrupting_json() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1446,8 +1446,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::save_changeset_post().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save_changeset_post()
- * @covers WP_Customize_Manager::update_stashed_theme_mod_settings()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save_changeset_post
+ * @covers WP_Customize_Manager::update_stashed_theme_mod_settings
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_save_changeset_post_with_theme_activation() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1485,7 +1485,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test saving changesets with varying users and capabilities.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 38705
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save_changeset_post()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save_changeset_post
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_save_changeset_post_with_varying_users() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1660,7 +1660,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 31089
</span><span class="cx" style="display: block; padding: 0 10px"> * @see wp_delete_auto_drafts()
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save_changeset_post()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save_changeset_post
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_save_changeset_post_dumping_auto_draft_date() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1700,7 +1700,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test writing changesets when user supplies unchanged values.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 38865
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save_changeset_post()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save_changeset_post
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_save_changeset_post_with_unchanged_values() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1790,8 +1790,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test writing changesets when user supplies unchanged values.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39896
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save_changeset_post()
- * @covers WP_Customize_Manager::grant_edit_post_capability_for_changeset()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save_changeset_post
+ * @covers WP_Customize_Manager::grant_edit_post_capability_for_changeset
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_save_changeset_post_with_autosave() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$admin_user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1900,7 +1900,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test passing `null` for a setting ID to remove it from the changeset.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 41621
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save_changeset_post()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save_changeset_post
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_remove_setting_from_changeset_post() {
</span><span class="cx" style="display: block; padding: 0 10px"> $uuid = wp_generate_uuid4();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1936,7 +1936,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test writing changesets and publishing with users who can unfiltered_html and those who cannot.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 38705
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::save_changeset_post()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::save_changeset_post
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_save_changeset_post_with_varying_unfiltered_html_cap() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2006,7 +2006,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * publishing
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39221
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::_wp_customize_publish_changeset()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::_wp_customize_publish_changeset
</ins><span class="cx" style="display: block; padding: 0 10px"> * @see WP_Customize_Widgets::schedule_customize_register()
</span><span class="cx" style="display: block; padding: 0 10px"> * @see WP_Customize_Widgets::customize_register()
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2192,7 +2192,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::is_cross_domain().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::is_cross_domain()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::is_cross_domain
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_is_cross_domain() {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_customize = new WP_Customize_Manager();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2210,7 +2210,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::get_allowed_urls().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::get_allowed_urls()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::get_allowed_urls
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_get_allowed_urls() {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_customize = new WP_Customize_Manager();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2293,7 +2293,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::unsanitized_post_values().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::unsanitized_post_values()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::unsanitized_post_values
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$admin_user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2607,7 +2607,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::validate_setting_values().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 37638
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::validate_setting_values()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::validate_setting_values
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_late_validate_setting_values() {
</span><span class="cx" style="display: block; padding: 0 10px"> $setting = new Test_Setting_Without_Applying_Validate_Filter( $this->manager, 'required' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2633,7 +2633,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::validate_setting_values().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 30937
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::validate_setting_values()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::validate_setting_values
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_validate_setting_values_args() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$admin_user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2814,7 +2814,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Manager::has_published_pages().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 38013
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::has_published_pages()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::has_published_pages
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_has_published_pages() {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( get_pages() as $page ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2843,7 +2843,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Ensure that page stubs created via nav menus will cause has_published_pages to return true.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 38013
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::has_published_pages()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::has_published_pages
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_has_published_pages_when_nav_menus_created_posts() {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( get_pages() as $page ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3115,7 +3115,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test remove_frameless_preview_messenger_channel.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 38867
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Manager::remove_frameless_preview_messenger_channel()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Manager::remove_frameless_preview_messenger_channel
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_remove_frameless_preview_messenger_channel() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$admin_user_id );
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizenavmenuitemsettingphp"></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/customize/nav-menu-item-setting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/customize/nav-menu-item-setting.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -944,7 +944,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item() to set url for posts, terms, and post type archives.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 38945
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_value_as_wp_post_nav_menu_item_term_urls() {
</span><span class="cx" style="display: block; padding: 0 10px"> $term_id = self::factory()->term->create( array( 'taxonomy' => 'category' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1017,7 +1017,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item() for obtaining original title.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 38945
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Nav_Menu_Item_Setting::get_original_title()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Nav_Menu_Item_Setting::get_original_title
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_get_original_title() {
</span><span class="cx" style="display: block; padding: 0 10px"> $menu_id = wp_create_nav_menu( 'Menu' );
</span></span></pre></div>
<a id="trunktestsphpunittestscustomizenavmenusphp"></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/customize/nav-menus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/customize/nav-menus.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/customize/nav-menus.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -661,7 +661,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test insert_auto_draft_post method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Nav_Menus::insert_auto_draft_post()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Nav_Menus::insert_auto_draft_post
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_insert_auto_draft_post() {
</span><span class="cx" style="display: block; padding: 0 10px"> $menus = new WP_Customize_Nav_Menus( $this->wp_customize );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -835,7 +835,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test make_auto_draft_status_previewable.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Nav_Menus::make_auto_draft_status_previewable()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Nav_Menus::make_auto_draft_status_previewable
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_make_auto_draft_status_previewable() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_post_statuses;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -847,7 +847,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test sanitize_nav_menus_created_posts.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Nav_Menus::sanitize_nav_menus_created_posts()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Nav_Menus::sanitize_nav_menus_created_posts
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_sanitize_nav_menus_created_posts() {
</span><span class="cx" style="display: block; padding: 0 10px"> $menus = new WP_Customize_Nav_Menus( $this->wp_customize );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -921,7 +921,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test save_nav_menus_created_posts.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Nav_Menus::save_nav_menus_created_posts()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Nav_Menus::save_nav_menus_created_posts
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_save_nav_menus_created_posts() {
</span><span class="cx" style="display: block; padding: 0 10px"> $menus = new WP_Customize_Nav_Menus( $this->wp_customize );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1114,8 +1114,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test the filter_wp_nav_menu method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Customize_Nav_Menus::filter_wp_nav_menu()
- * @covers WP_Customize_Nav_Menus::filter_wp_nav_menu_args()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Customize_Nav_Menus::filter_wp_nav_menu
+ * @covers WP_Customize_Nav_Menus::filter_wp_nav_menu_args
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_filter_wp_nav_menu() {
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'customize_register', $this->wp_customize );
</span></span></pre></div>
<a id="trunktestsphpunittestsdependenciesscriptsphp"></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/dependencies/scripts.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/dependencies/scripts.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/dependencies/scripts.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1045,7 +1045,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Testing `wp_enqueue_code_editor` with file path.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 41871
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::wp_enqueue_code_editor()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::wp_enqueue_code_editor
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_enqueue_code_editor_when_php_file_will_be_passed() {
</span><span class="cx" style="display: block; padding: 0 10px"> $real_file = WP_PLUGIN_DIR . '/hello.php';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1132,7 +1132,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Testing `wp_enqueue_code_editor` with `compact`.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 41871
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::wp_enqueue_code_editor()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::wp_enqueue_code_editor
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will_be_passed() {
</span><span class="cx" style="display: block; padding: 0 10px"> $file = '';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1215,7 +1215,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Testing `wp_enqueue_code_editor` with `array_merge`.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 41871
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::wp_enqueue_code_editor()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::wp_enqueue_code_editor
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_enqueue_code_editor_when_generated_array_by_array_merge_will_be_passed() {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_enqueue_code_editor = wp_enqueue_code_editor(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1312,7 +1312,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Testing `wp_enqueue_code_editor` with `array`.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 41871
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::wp_enqueue_code_editor()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::wp_enqueue_code_editor
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_wp_enqueue_code_editor_when_simple_array_will_be_passed() {
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_enqueue_code_editor = wp_enqueue_code_editor(
</span></span></pre></div>
<a id="trunktestsphpunittestsgeneralwpErrorphp"></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/general/wpError.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/general/wpError.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/general/wpError.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -100,7 +100,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">- * @covers ::get_error_codes()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_codes
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_codes_with_no_errors_should_return_empty_array() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEmpty( $this->wp_error->get_error_codes() );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -107,7 +107,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">- * @covers ::get_error_codes()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_codes
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_codes_with_one_error_should_return_an_array_with_only_that_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -116,7 +116,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">- * @covers ::get_error_codes()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_codes
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_codes_with_multiple_errors_should_return_an_array_of_those_codes() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -128,7 +128,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">- * @covers ::get_error_code()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_code
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_code_with_no_errors_should_return_an_empty_string() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( '', $this->wp_error->get_error_code() );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -135,7 +135,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">- * @covers ::get_error_code()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_code
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_code_with_one_error_should_return_that_error_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -144,7 +144,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">- * @covers ::get_error_code()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_code
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_code_with_multiple_errors_should_return_only_the_first_error_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -154,7 +154,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">- * @covers ::get_error_messages()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_messages
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_messages_with_empty_code_and_no_errors_should_return_an_empty_array() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEmpty( $this->wp_error->get_error_messages() );
</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">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::get_error_messages()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_messages
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_messages_with_empty_code_one_error_should_return_an_array_with_that_message() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -170,7 +170,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">- * @covers ::get_error_messages()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_messages
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_messages_with_empty_code_multiple_errors_should_return_an_array_of_messages() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -180,7 +180,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">- * @covers ::get_error_messages()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_messages
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_messages_with_an_invalid_code_should_return_an_empty_array() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertEmpty( $this->wp_error->get_error_messages( 'code' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -187,7 +187,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">- * @covers ::get_error_messages()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_messages
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_messages_with_one_error_should_return_an_array_with_that_message() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -196,7 +196,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">- * @covers ::get_error_messages()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_messages
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_messages_with_multiple_errors_same_code_should_return_an_array_with_all_messages() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -206,7 +206,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">- * @covers ::get_error_message()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_message
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_message_with_empty_code_and_no_errors_should_return_an_empty_string() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( '', $this->wp_error->get_error_message() );
</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"> }
</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">- * @covers ::get_error_message()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_message
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_message_with_empty_code_and_one_error_should_return_that_message() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -222,7 +222,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">- * @covers ::get_error_message()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_message
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_message_with_empty_code_and_multiple_errors_should_return_the_first_message() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -232,7 +232,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">- * @covers ::get_error_message()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_message
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_message_with_empty_code_and_multiple_errors_multiple_codes_should_return_the_first_message() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -243,7 +243,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">- * @covers ::get_error_message()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_message
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_message_with_invalid_code_and_no_errors_should_return_empty_string() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( '', $this->wp_error->get_error_message( 'invalid' ) );
</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"> }
</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">- * @covers ::get_error_message()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_message
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_message_with_invalid_code_and_one_error_should_return_an_empty_string() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -259,7 +259,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">- * @covers ::get_error_message()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_message
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_message_with_invalid_code_and_multiple_errors_should_return_an_empty_string() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -269,7 +269,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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_empty_code_and_no_errors_should_evaluate_as_null() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( null, $this->wp_error->get_error_data() );
</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"> }
</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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_empty_code_one_error_no_data_should_evaluate_as_null() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -285,7 +285,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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_empty_code_multiple_errors_no_data_should_evaluate_as_null() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -295,7 +295,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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_empty_code_and_one_error_with_data_should_return_that_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = array( 'data-key' => 'data-value' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -305,7 +305,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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_empty_code_and_multiple_errors_different_codes_should_return_the_last_data_of_the_first_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = array( 'data-key' => 'data-value' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -316,7 +316,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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_empty_code_and_multiple_errors_same_code_should_return_the_last_data_of_the_first_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -327,7 +327,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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_code_and_no_errors_should_evaluate_as_null() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertSame( null, $this->wp_error->get_error_data( 'code' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -334,7 +334,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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_code_and_one_error_with_no_data_should_evaluate_as_null() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -343,7 +343,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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_code_and_one_error_with_data_should_return_that_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = array( 'data-key' => 'data-value' );
</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"> }
</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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_code_and_multiple_errors_different_codes_should_return_the_last_stored_data_of_the_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $expected = array( 'data3' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -365,7 +365,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">- * @covers ::get_error_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::get_error_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_error_data_with_code_and_multiple_errors_same_code_should_return_the_last_stored_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -376,7 +376,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">- * @covers ::has_errors()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::has_errors
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_has_errors_with_no_errors_returns_false() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->assertFalse( $this->wp_error->has_errors() );
</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"> }
</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">- * @covers ::has_errors()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::has_errors
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_has_errors_with_errors_returns_true() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -391,7 +391,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_empty_code_empty_message_empty_data_should_add_empty_key_to_errors_array() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( '', '', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -400,7 +400,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_empty_code_empty_message_empty_data_should_add_empty_message_to_errors_array_under_empty_key() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( '', '', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -409,7 +409,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_empty_code_empty_message_empty_data_should_not_alter_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( '', '', '' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -418,7 +418,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_empty_code_empty_message_non_empty_data_should_store_data_under_an_empty_code_key() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( '', '', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -427,7 +427,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_code_empty_message_empty_data_should_add_error_with_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', '' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -436,7 +436,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_code_empty_message_empty_data_should_add_error_with_empty_message() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', '' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -445,7 +445,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_code_empty_message_empty_data_should_not_add_error_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', '' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -454,7 +454,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_code_and_message_and_empty_data_should_should_add_error_with_that_message() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -463,7 +463,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_code_and_message_and_empty_data_should_not_alter_stored_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -472,7 +472,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_code_and_empty_message_and_data_should_add_error_with_that_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', '', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -481,7 +481,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_code_and_empty_message_and_data_should_store_that_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', '', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -490,7 +490,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_code_and_message_and_data_should_add_an_error_with_that_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -499,7 +499,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_code_and_message_and_data_should_add_an_error_with_that_message() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -508,7 +508,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_with_code_and_message_and_data_should_store_that_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -517,7 +517,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_multiple_times_with_the_same_code_should_add_additional_messages_for_that_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -529,7 +529,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">- * @covers ::add()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_multiple_times_with_the_same_code_and_different_data_should_store_only_the_last_added_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message', 'data-bar' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -539,7 +539,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">- * @covers ::add_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_data_with_empty_data_empty_code_should_create_orphaned_data_with_no_error() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add_data( '' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -548,7 +548,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">- * @covers ::add_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_data_with_empty_data_empty_code_no_errors_should_create_data_under_an_empty_code_key() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add_data( '' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -557,7 +557,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">- * @covers ::add_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_data_with_data_empty_code_and_one_error_should_store_the_data_under_that_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -567,7 +567,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">- * @covers ::add_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_data_with_data_empty_code_and_multiple_errors_with_different_codes_should_store_it_under_the_first_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -579,7 +579,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">- * @covers ::add_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_data_with_data_empty_code_and_multiple_errors_with_same_code_should_store_it_under_the_first_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -592,7 +592,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">- * @covers ::add_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_data_with_data_and_code_and_no_errors_should_create_orphaned_data_with_no_error() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add_data( 'data', 'code' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -601,7 +601,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">- * @covers ::add_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_data_with_data_and_code_no_errors_should_create_data_under_that_code_key() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add_data( 'data', 'code' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -610,7 +610,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">- * @covers ::add_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_data_with_data_and_code_one_error_different_code_should_create_orphaned_data_with_no_error() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -621,7 +621,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">- * @covers ::add_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_data_with_data_and_code_one_error_different_code_should_create_data_under_that_code_key() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -632,7 +632,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">- * @covers ::add_data()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::add_data
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_add_data_with_data_and_code_should_add_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -643,7 +643,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">- * @covers ::remove()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::remove
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_remove_with_no_errors_should_affect_nothing() {
</span><span class="cx" style="display: block; padding: 0 10px"> $before = $this->wp_error->errors;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -656,7 +656,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">- * @covers ::remove()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::remove
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_remove_empty_code_no_errors_should_affect_nothing() {
</span><span class="cx" style="display: block; padding: 0 10px"> $before = $this->wp_error->errors;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -669,7 +669,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">- * @covers ::remove()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::remove
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_remove_empty_code_and_one_error_with_empty_string_code_should_remove_error() {
</span><span class="cx" style="display: block; padding: 0 10px"> $before = $this->wp_error->errors;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -684,7 +684,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">- * @covers ::remove()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::remove
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_remove_empty_code_and_one_error_with_empty_string_code_should_remove_error_data() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( '', 'message', 'data' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -697,7 +697,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">- * @covers ::remove()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::remove
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_remove_should_remove_the_error_with_the_given_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -708,7 +708,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">- * @covers ::remove()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::remove
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_remove_should_remove_the_error_data_associated_with_the_given_code() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->wp_error->add( 'code', 'message', 'data' );
</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 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/post/nav-menu.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -679,7 +679,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test _wp_delete_customize_changeset_dependent_auto_drafts.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::_wp_delete_customize_changeset_dependent_auto_drafts()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::_wp_delete_customize_changeset_dependent_auto_drafts
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_delete_customize_changeset_dependent_auto_drafts() {
</span><span class="cx" style="display: block; padding: 0 10px"> $auto_draft_post_id = $this->factory()->post->create(
</span></span></pre></div>
<a id="trunktestsphpunittestsposttypesphp"></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/types.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/types.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/post/types.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -68,7 +68,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"> * @ticket 35985
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::register_post_type()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::register_post_type
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_register_post_type_exclude_from_search_should_default_to_opposite_value_of_public() {
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -82,7 +82,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"> * @ticket 35985
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::register_post_type()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::register_post_type
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_register_post_type_publicly_queryable_should_default_to_value_of_public() {
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -96,7 +96,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"> * @ticket 35985
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::register_post_type()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::register_post_type
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_register_post_type_show_ui_should_default_to_value_of_public() {
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -110,7 +110,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"> * @ticket 35985
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::register_post_type()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::register_post_type
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_register_post_type_show_in_menu_should_default_to_value_of_show_ui() {
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -129,7 +129,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"> * @ticket 35985
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::register_post_type()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::register_post_type
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_register_post_type_show_in_nav_menus_should_default_to_value_of_public() {
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</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">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 35985
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::register_post_type()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::register_post_type
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_register_post_type_show_in_admin_bar_should_default_to_value_of_show_in_menu() {
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestblockrenderercontrollerphp"></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/rest-block-renderer-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -258,7 +258,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 45098
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_REST_Block_Renderer_Controller::register_routes()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_REST_Block_Renderer_Controller::register_routes
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_register_routes() {
</span><span class="cx" style="display: block; padding: 0 10px"> $dynamic_block_names = get_dynamic_block_names();
</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"> * @ticket 45098
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_REST_Block_Renderer_Controller::get_item()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_REST_Block_Renderer_Controller::get_item
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_item_without_permissions() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( 0 );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -305,7 +305,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 45098
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_REST_Block_Renderer_Controller::get_item()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_REST_Block_Renderer_Controller::get_item
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_item_invalid_block_name() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -322,7 +322,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 45098
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_REST_Block_Renderer_Controller::get_item()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_REST_Block_Renderer_Controller::get_item
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_item_invalid_attribute() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -343,7 +343,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 45098
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_REST_Block_Renderer_Controller::get_item()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_REST_Block_Renderer_Controller::get_item
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_item_unrecognized_attribute() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -364,7 +364,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 45098
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_REST_Block_Renderer_Controller::get_item()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_REST_Block_Renderer_Controller::get_item
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_item_default_attributes() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -396,7 +396,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 45098
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_REST_Block_Renderer_Controller::get_item()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_REST_Block_Renderer_Controller::get_item
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_item() {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_set_current_user( self::$user_id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -589,7 +589,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @ticket 45098
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_REST_Block_Renderer_Controller::get_item_schema()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_REST_Block_Renderer_Controller::get_item_schema
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_item_schema() {
</span><span class="cx" style="display: block; padding: 0 10px"> $request = new WP_REST_Request( 'OPTIONS', self::$rest_api_route . self::$block_name );
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestpostscontrollerphp"></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/rest-posts-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/rest-api/rest-posts-controller.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3537,7 +3537,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test update_item() with same template that no longer exists.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_REST_Posts_Controller::check_template()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_REST_Posts_Controller::check_template
</ins><span class="cx" style="display: block; padding: 0 10px"> * @ticket 39996
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_update_item_with_same_template_that_no_longer_exists() {
</span></span></pre></div>
<a id="trunktestsphpunitteststhemephp"></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/theme.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/theme.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/theme.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -352,7 +352,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test _wp_keep_alive_customize_changeset_dependent_auto_drafts.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::_wp_keep_alive_customize_changeset_dependent_auto_drafts()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::_wp_keep_alive_customize_changeset_dependent_auto_drafts
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_wp_keep_alive_customize_changeset_dependent_auto_drafts() {
</span><span class="cx" style="display: block; padding: 0 10px"> $nav_created_post_ids = $this->factory()->post->create_many(
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetsmediaaudiowidgetphp"></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/media-audio-widget.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/media-audio-widget.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/widgets/media-audio-widget.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -85,7 +85,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test constructor.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Audio::__construct()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Audio::__construct
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_constructor() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = new WP_Widget_Media_Audio();
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetsmediagallerywidgetphp"></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/media-gallery-widget.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/media-gallery-widget.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/widgets/media-gallery-widget.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,7 +29,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test get_instance_schema method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Gallery::get_instance_schema()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Gallery::get_instance_schema
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_get_instance_schema() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = new WP_Widget_Media_Gallery();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,7 +51,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test update() method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Gallery::render_media()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Gallery::render_media
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_render_media() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = new WP_Widget_Media_Gallery();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -89,7 +89,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test enqueue_admin_scripts() method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Gallery::enqueue_admin_scripts()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Gallery::enqueue_admin_scripts
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_enqueue_admin_scripts() {
</span><span class="cx" style="display: block; padding: 0 10px"> set_current_screen( 'widgets.php' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -108,7 +108,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test update() method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Gallery::update()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Gallery::update
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_update() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = new WP_Widget_Media_Gallery();
</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"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test render_control_template_scripts() method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Gallery::render_control_template_scripts()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Gallery::render_control_template_scripts
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_render_control_template_scripts() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = new WP_Widget_Media_Gallery();
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetsmediaimagewidgetphp"></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/media-image-widget.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/media-image-widget.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/widgets/media-image-widget.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,7 +92,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test constructor.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Image::__construct()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Image::__construct
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_constructor() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = new WP_Widget_Media_Image();
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetsmediavideowidgetphp"></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/media-video-widget.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/media-video-widget.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/widgets/media-video-widget.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,7 +29,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test get_instance_schema method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Video::get_instance_schema()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Video::get_instance_schema
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_get_instance_schema() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = new WP_Widget_Media_Video();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -86,7 +86,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test constructor.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Video::__construct()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Video::__construct
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_constructor() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = new WP_Widget_Media_Video();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -115,7 +115,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test get_instance_schema method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Video::update()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Video::update
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_update() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = new WP_Widget_Media_Video();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -215,8 +215,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test render_media method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Video::render_media()
- * @covers WP_Widget_Media_Video::inject_video_max_width_style()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Video::render_media
+ * @covers WP_Widget_Media_Video::inject_video_max_width_style
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_render_media() {
</span><span class="cx" style="display: block; padding: 0 10px"> $test_movie_file = __FILE__ . '../../data/uploads/small-video.m4v';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -303,7 +303,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Scripts $wp_scripts
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Styles $wp_styles
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Video::enqueue_preview_scripts()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Video::enqueue_preview_scripts
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_enqueue_preview_scripts() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_scripts, $wp_styles;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -328,7 +328,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test enqueue_admin_scripts method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Video::enqueue_admin_scripts()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Video::enqueue_admin_scripts
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_enqueue_admin_scripts() {
</span><span class="cx" style="display: block; padding: 0 10px"> set_current_screen( 'widgets.php' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -341,7 +341,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test render_control_template_scripts method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media_Video::render_control_template_scripts()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media_Video::render_control_template_scripts
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_render_control_template_scripts() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = new WP_Widget_Media_Video();
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetsmediawidgetphp"></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/media-widget.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/media-widget.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/widgets/media-widget.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,8 +50,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test constructor.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media::__construct()
- * @covers WP_Widget_Media::_register()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media::__construct
+ * @covers WP_Widget_Media::_register
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_constructor() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = $this->get_mocked_class_instance();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -106,8 +106,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test constructor in customize preview.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Customize_Manager $wp_customize
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media::__construct()
- * @covers WP_Widget_Media::_register()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media::__construct
+ * @covers WP_Widget_Media::_register
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_constructor_in_customize_preview() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -228,7 +228,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test update method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media::update()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media::update
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_update() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = $this->get_mocked_class_instance();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -314,8 +314,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test widget method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media::widget()
- * @covers WP_Widget_Media::render_media()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media::widget
+ * @covers WP_Widget_Media::render_media
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_widget() {
</span><span class="cx" style="display: block; padding: 0 10px"> $args = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -389,7 +389,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test form method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media::form()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media::form
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_form() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = $this->get_mocked_class_instance();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -406,7 +406,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test display_media_state method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media::display_media_state()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media::display_media_state
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_display_media_state() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widget = $this->get_mocked_class_instance();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -448,7 +448,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test enqueue_admin_scripts method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media::enqueue_admin_scripts()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media::enqueue_admin_scripts
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_enqueue_admin_scripts() {
</span><span class="cx" style="display: block; padding: 0 10px"> set_current_screen( 'widgets.php' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -476,7 +476,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test has_content method.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Media::has_content()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Media::has_content
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_has_content() {
</span><span class="cx" style="display: block; padding: 0 10px"> $attachment_id = self::factory()->attachment->create_object(
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetstextwidgetphp"></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/text-widget.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets/text-widget.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/widgets/text-widget.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -75,8 +75,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Test register in customize preview.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Customize_Manager $wp_customize
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers WP_Widget_Text::__construct()
- * @covers WP_Widget_Text::_register()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers WP_Widget_Text::__construct
+ * @covers WP_Widget_Text::_register
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test__register_in_customize_preview() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_customize;
</span></span></pre></div>
<a id="trunktestsphpunittestswidgetsphp"></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.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/widgets.php 2020-08-24 22:32:20 UTC (rev 48857)
+++ trunk/tests/phpunit/tests/widgets.php 2020-08-25 00:57:17 UTC (rev 48858)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -740,7 +740,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Tests for when 'sidebars_widgets' theme mod is populated.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::retrieve_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::retrieve_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_retrieve_widgets_with_theme_mod() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $sidebars_widgets, $_wp_sidebars_widgets;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -804,7 +804,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Tests for when sidebars widgets matches registered sidebars.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::retrieve_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::retrieve_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_retrieve_widgets_with_sidebars_widgets_matching_registered_sidebars() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $sidebars_widgets;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -842,7 +842,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Tests for when sidebars widgets doesn't match registered sidebars.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::retrieve_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::retrieve_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_retrieve_widgets_with_sidebars_widgets_not_matching_registered_sidebars() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $sidebars_widgets, $_wp_sidebars_widgets;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -936,7 +936,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Tests for Customizer mode.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::retrieve_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::retrieve_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_retrieve_widgets_for_customizer() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $sidebars_widgets, $_wp_sidebars_widgets;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1008,7 +1008,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Tests for orphaned widgets being moved into inactive widgets.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::retrieve_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::retrieve_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function test_retrieve_widgets_move_orphaned_widgets_to_inactive() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $sidebars_widgets;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1043,7 +1043,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Test _wp_remove_unregistered_widgets.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::_wp_remove_unregistered_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::_wp_remove_unregistered_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test__wp_remove_unregistered_widgets() {
</span><span class="cx" style="display: block; padding: 0 10px"> $widgets = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1073,7 +1073,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Two themes with one sidebar each should just map, switching to a theme not previously-active.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::wp_map_sidebars_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::wp_map_sidebars_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_one_sidebar_each() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->register_sidebars( array( 'primary' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1093,7 +1093,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Sidebars with the same name should map, switching to a theme not previously-active.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::wp_map_sidebars_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::wp_map_sidebars_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_sidebars_with_same_slug() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->register_sidebars( array( 'primary', 'secondary' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1111,7 +1111,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Make educated guesses on theme sidebars.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::wp_map_sidebars_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::wp_map_sidebars_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_sidebar_guessing() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->register_sidebars( array( 'primary', 'secondary' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1134,7 +1134,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Make sure two sidebars that fall in the same group don't get the same menu assigned.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::wp_map_sidebars_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::wp_map_sidebars_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_sidebar_guessing_one_menu_per_group() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->register_sidebars( array( 'primary' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1155,7 +1155,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Make sure two sidebars that fall in the same group get menus assigned from the same group.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @covers ::wp_map_sidebars_widgets()
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @covers ::wp_map_sidebars_widgets
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function test_sidebar_guessing_one_menu_per_sidebar() {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->register_sidebars( array( 'primary', 'main' ) );
</span></span></pre>
</div>
</div>
</body>
</html>