Ticket #51557: 51557-property-visibility.patch
| File 51557-property-visibility.patch, 32.2 KB (added by , 6 years ago) |
|---|
-
src/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php
From 4ae2f4a83a963611aa939ebeed4dde15058cd51a Mon Sep 17 00:00:00 2001 From: jrfnl <jrfnl@users.noreply.github.com> Date: Sat, 17 Oct 2020 16:33:33 +0200 Subject: [PATCH] Modernize: use explicit visibility for property declarations Using `var` or just and only `static` to declare a class property is PHP 4 code. PHP 5 introduced visibility modifiers. This updates the code base to use explicit visibility modifier for properties. No review has been done on what the visibility of the properties _should_ be as a property without visibility defaults to `public` and changing that to a more closed visibility would be a BC-break. --- .../class-twentynineteen-svg-icons.php | 6 +-- src/wp-includes/class-wp-rewrite.php | 42 +++++++++---------- src/wp-includes/pomo/entry.php | 18 ++++---- src/wp-includes/pomo/mo.php | 2 +- src/wp-includes/pomo/po.php | 2 +- src/wp-includes/pomo/streams.php | 6 +-- src/wp-includes/pomo/translations.php | 8 ++-- src/wp-includes/wp-db.php | 22 +++++----- .../class-wp-unittest-generator-sequence.php | 2 +- tests/phpunit/includes/mock-mailer.php | 2 +- tests/phpunit/includes/testcase-canonical.php | 14 +++---- tests/phpunit/includes/utils.php | 8 ++-- tests/phpunit/tests/admin/includesScreen.php | 2 +- tests/phpunit/tests/cache.php | 2 +- tests/phpunit/tests/feed/atom.php | 6 +-- tests/phpunit/tests/feed/rss2.php | 8 ++-- .../phpunit/tests/functions/wpListFilter.php | 4 +- tests/phpunit/tests/http/base.php | 4 +- tests/phpunit/tests/http/curl.php | 2 +- tests/phpunit/tests/http/streams.php | 2 +- tests/phpunit/tests/image/header.php | 2 +- tests/phpunit/tests/link/getDashboardUrl.php | 2 +- .../tests/multisite/wpMSSitesListTable.php | 2 +- tests/phpunit/tests/query/commentCount.php | 4 +- tests/phpunit/tests/query/date.php | 2 +- tests/phpunit/tests/query/results.php | 22 +++++----- tests/phpunit/tests/query/stickies.php | 2 +- tests/phpunit/tests/theme/customHeader.php | 2 +- tests/phpunit/tests/upload.php | 2 +- tests/phpunit/tests/user/countUserPosts.php | 4 +- .../tests/user/getActiveBlogForUser.php | 2 +- tests/phpunit/tests/user/listAuthors.php | 8 ++-- tests/phpunit/tests/walker.php | 4 +- tests/phpunit/tests/xmlrpc/wp/getComments.php | 2 +- .../phpunit/tests/xmlrpc/wp/getMediaItem.php | 4 +- tests/phpunit/tests/xmlrpc/wp/getPost.php | 8 ++-- tests/phpunit/tests/xmlrpc/wp/getPostType.php | 4 +- .../tests/xmlrpc/wp/restoreRevision.php | 4 +- 38 files changed, 121 insertions(+), 121 deletions(-) diff --git a/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php b/src/wp-content/themes/twentynineteen/classes/class-twentynineteen-svg-icons.php index 01a35c0309..aa2ebf27bb 100644
a b class TwentyNineteen_SVG_Icons { 70 70 * 71 71 * @var array 72 72 */ 73 static $ui_icons = array(73 public static $ui_icons = array( 74 74 'link' => /* material-design – link */ ' 75 75 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> 76 76 <path d="M0 0h24v24H0z" fill="none"></path> … … class TwentyNineteen_SVG_Icons { 178 178 * 179 179 * @var array 180 180 */ 181 static $social_icons_map = array(181 public static $social_icons_map = array( 182 182 'amazon' => array( 183 183 'amazon.com', 184 184 'amazon.cn', … … class TwentyNineteen_SVG_Icons { 237 237 * 238 238 * @var array 239 239 */ 240 static $social_icons = array(240 public static $social_icons = array( 241 241 '500px' => ' 242 242 <svg viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 243 243 <path d="M6.94026,15.1412c.00437.01213.108.29862.168.44064a6.55008,6.55008,0,1,0,6.03191-9.09557,6.68654,6.68654,0,0,0-2.58357.51467A8.53914,8.53914,0,0,0,8.21268,8.61344L8.209,8.61725V3.22948l9.0504-.00008c.32934-.0036.32934-.46353.32934-.61466s0-.61091-.33035-.61467L7.47248,2a.43.43,0,0,0-.43131.42692v7.58355c0,.24466.30476.42131.58793.4819.553.11812.68074-.05864.81617-.2457l.018-.02481A10.52673,10.52673,0,0,1,9.32258,9.258a5.35268,5.35268,0,1,1,7.58985,7.54976,5.417,5.417,0,0,1-3.80867,1.56365,5.17483,5.17483,0,0,1-2.69822-.74478l.00342-4.61111a2.79372,2.79372,0,0,1,.71372-1.78792,2.61611,2.61611,0,0,1,1.98282-.89477,2.75683,2.75683,0,0,1,1.95525.79477,2.66867,2.66867,0,0,1,.79656,1.909,2.724,2.724,0,0,1-2.75849,2.748,4.94651,4.94651,0,0,1-.86254-.13719c-.31234-.093-.44519.34058-.48892.48349-.16811.54966.08453.65862.13687.67489a3.75751,3.75751,0,0,0,1.25234.18375,3.94634,3.94634,0,1,0-2.82444-6.742,3.67478,3.67478,0,0,0-1.13028,2.584l-.00041.02323c-.0035.11667-.00579,2.881-.00644,3.78811l-.00407-.00451a6.18521,6.18521,0,0,1-1.0851-1.86092c-.10544-.27856-.34358-.22925-.66857-.12917-.14192.04372-.57386.17677-.47833.489Zm4.65165-1.08338a.51346.51346,0,0,0,.19513.31818l.02276.022a.52945.52945,0,0,0,.3517.18416.24242.24242,0,0,0,.16577-.0611c.05473-.05082.67382-.67812.73287-.738l.69041.68819a.28978.28978,0,0,0,.21437.11032.53239.53239,0,0,0,.35708-.19486c.29792-.30419.14885-.46821.07676-.54751l-.69954-.69975.72952-.73469c.16-.17311.01874-.35708-.12218-.498-.20461-.20461-.402-.25742-.52855-.14083l-.7254.72665-.73354-.73375a.20128.20128,0,0,0-.14179-.05695.54135.54135,0,0,0-.34379.19648c-.22561.22555-.274.38149-.15656.5059l.73374.7315-.72942.73072A.26589.26589,0,0,0,11.59191,14.05782Zm1.59866-9.915A8.86081,8.86081,0,0,0,9.854,4.776a.26169.26169,0,0,0-.16938.22759.92978.92978,0,0,0,.08619.42094c.05682.14524.20779.531.50006.41955a8.40969,8.40969,0,0,1,2.91968-.55484,7.87875,7.87875,0,0,1,3.086.62286,8.61817,8.61817,0,0,1,2.30562,1.49315.2781.2781,0,0,0,.18318.07586c.15529,0,.30425-.15253.43167-.29551.21268-.23861.35873-.4369.1492-.63538a8.50425,8.50425,0,0,0-2.62312-1.694A9.0177,9.0177,0,0,0,13.19058,4.14283ZM19.50945,18.6236h0a.93171.93171,0,0,0-.36642-.25406.26589.26589,0,0,0-.27613.06613l-.06943.06929A7.90606,7.90606,0,0,1,7.60639,18.505a7.57284,7.57284,0,0,1-1.696-2.51537,8.58715,8.58715,0,0,1-.5147-1.77754l-.00871-.04864c-.04939-.25873-.28755-.27684-.62981-.22448-.14234.02178-.5755.088-.53426.39969l.001.00712a9.08807,9.08807,0,0,0,15.406,4.99094c.00193-.00192.04753-.04718.0725-.07436C19.79425,19.16234,19.87422,18.98728,19.50945,18.6236Z"></path> -
src/wp-includes/class-wp-rewrite.php
diff --git a/src/wp-includes/class-wp-rewrite.php b/src/wp-includes/class-wp-rewrite.php index 729ddf3663..6b5fc05fc8 100644
a b class WP_Rewrite { 45 45 * @since 1.5.0 46 46 * @var string 47 47 */ 48 var$author_base = 'author';48 public $author_base = 'author'; 49 49 50 50 /** 51 51 * Permalink structure for author archives. … … class WP_Rewrite { 53 53 * @since 1.5.0 54 54 * @var string 55 55 */ 56 var$author_structure;56 public $author_structure; 57 57 58 58 /** 59 59 * Permalink structure for date archives. … … class WP_Rewrite { 61 61 * @since 1.5.0 62 62 * @var string 63 63 */ 64 var$date_structure;64 public $date_structure; 65 65 66 66 /** 67 67 * Permalink structure for pages. … … class WP_Rewrite { 69 69 * @since 1.5.0 70 70 * @var string 71 71 */ 72 var$page_structure;72 public $page_structure; 73 73 74 74 /** 75 75 * Base of the search permalink structure (example.com/$search_base/query). … … class WP_Rewrite { 77 77 * @since 1.5.0 78 78 * @var string 79 79 */ 80 var$search_base = 'search';80 public $search_base = 'search'; 81 81 82 82 /** 83 83 * Permalink structure for searches. … … class WP_Rewrite { 85 85 * @since 1.5.0 86 86 * @var string 87 87 */ 88 var$search_structure;88 public $search_structure; 89 89 90 90 /** 91 91 * Comments permalink base. … … class WP_Rewrite { 93 93 * @since 1.5.0 94 94 * @var string 95 95 */ 96 var$comments_base = 'comments';96 public $comments_base = 'comments'; 97 97 98 98 /** 99 99 * Pagination permalink base. … … class WP_Rewrite { 109 109 * @since 4.2.0 110 110 * @var string 111 111 */ 112 var$comments_pagination_base = 'comment-page';112 public $comments_pagination_base = 'comment-page'; 113 113 114 114 /** 115 115 * Feed permalink base. … … class WP_Rewrite { 117 117 * @since 1.5.0 118 118 * @var string 119 119 */ 120 var$feed_base = 'feed';120 public $feed_base = 'feed'; 121 121 122 122 /** 123 123 * Comments feed permalink structure. … … class WP_Rewrite { 125 125 * @since 1.5.0 126 126 * @var string 127 127 */ 128 var$comment_feed_structure;128 public $comment_feed_structure; 129 129 130 130 /** 131 131 * Feed request permalink structure. … … class WP_Rewrite { 133 133 * @since 1.5.0 134 134 * @var string 135 135 */ 136 var$feed_structure;136 public $feed_structure; 137 137 138 138 /** 139 139 * The static portion of the post permalink structure. … … class WP_Rewrite { 178 178 * @since 1.5.0 179 179 * @var string 180 180 */ 181 var$matches = '';181 public $matches = ''; 182 182 183 183 /** 184 184 * Rewrite rules to match against the request to find the redirect or query. … … class WP_Rewrite { 186 186 * @since 1.5.0 187 187 * @var array 188 188 */ 189 var$rules;189 public $rules; 190 190 191 191 /** 192 192 * Additional rules added external to the rewrite class. … … class WP_Rewrite { 196 196 * @since 2.1.0 197 197 * @var array 198 198 */ 199 var$extra_rules = array();199 public $extra_rules = array(); 200 200 201 201 /** 202 202 * Additional rules that belong at the beginning to match first. … … class WP_Rewrite { 206 206 * @since 2.3.0 207 207 * @var array 208 208 */ 209 var$extra_rules_top = array();209 public $extra_rules_top = array(); 210 210 211 211 /** 212 212 * Rules that don't redirect to WordPress' index.php. … … class WP_Rewrite { 217 217 * @since 2.1.0 218 218 * @var array 219 219 */ 220 var$non_wp_rules = array();220 public $non_wp_rules = array(); 221 221 222 222 /** 223 223 * Extra permalink structures, e.g. categories, added by add_permastruct(). … … class WP_Rewrite { 225 225 * @since 2.1.0 226 226 * @var array 227 227 */ 228 var$extra_permastructs = array();228 public $extra_permastructs = array(); 229 229 230 230 /** 231 231 * Endpoints (like /trackback/) added by add_rewrite_endpoint(). … … class WP_Rewrite { 233 233 * @since 2.1.0 234 234 * @var array 235 235 */ 236 var$endpoints;236 public $endpoints; 237 237 238 238 /** 239 239 * Whether to write every mod_rewrite rule for WordPress into the .htaccess file. … … class WP_Rewrite { 277 277 * @since 1.5.0 278 278 * @var array 279 279 */ 280 var$rewritecode = array(280 public $rewritecode = array( 281 281 '%year%', 282 282 '%monthnum%', 283 283 '%day%', … … class WP_Rewrite { 298 298 * @since 1.5.0 299 299 * @var array 300 300 */ 301 var$rewritereplace = array(301 public $rewritereplace = array( 302 302 '([0-9]{4})', 303 303 '([0-9]{1,2})', 304 304 '([0-9]{1,2})', … … class WP_Rewrite { 318 318 * @since 1.5.0 319 319 * @var array 320 320 */ 321 var$queryreplace = array(321 public $queryreplace = array( 322 322 'year=', 323 323 'monthnum=', 324 324 'day=', -
src/wp-includes/pomo/entry.php
diff --git a/src/wp-includes/pomo/entry.php b/src/wp-includes/pomo/entry.php index a1293d4fa5..f0226dbc54 100644
a b if ( ! class_exists( 'Translation_Entry', false ) ) : 18 18 * 19 19 * @var boolean 20 20 */ 21 var$is_plural = false;21 public $is_plural = false; 22 22 23 var$context = null;24 var$singular = null;25 var$plural = null;26 var$translations = array();27 var$translator_comments = '';28 var$extracted_comments = '';29 var$references = array();30 var$flags = array();23 public $context = null; 24 public $singular = null; 25 public $plural = null; 26 public $translations = array(); 27 public $translator_comments = ''; 28 public $extracted_comments = ''; 29 public $references = array(); 30 public $flags = array(); 31 31 32 32 /** 33 33 * @param array $args associative array, support following keys: -
src/wp-includes/pomo/mo.php
diff --git a/src/wp-includes/pomo/mo.php b/src/wp-includes/pomo/mo.php index b4f829fdef..7e3bf81014 100644
a b require_once __DIR__ . '/streams.php'; 13 13 if ( ! class_exists( 'MO', false ) ) : 14 14 class MO extends Gettext_Translations { 15 15 16 var$_nplurals = 2;16 public $_nplurals = 2; 17 17 18 18 /** 19 19 * Loaded MO file. -
src/wp-includes/pomo/po.php
diff --git a/src/wp-includes/pomo/po.php b/src/wp-includes/pomo/po.php index 5030afb5df..b2a605a3ec 100644
a b ini_set( 'auto_detect_line_endings', 1 ); 21 21 if ( ! class_exists( 'PO', false ) ) : 22 22 class PO extends Gettext_Translations { 23 23 24 var$comments_before_headers = '';24 public $comments_before_headers = ''; 25 25 26 26 /** 27 27 * Exports headers to a PO entry -
src/wp-includes/pomo/streams.php
diff --git a/src/wp-includes/pomo/streams.php b/src/wp-includes/pomo/streams.php index 89e13a8f4b..3978d65791 100644
a b 11 11 if ( ! class_exists( 'POMO_Reader', false ) ) : 12 12 class POMO_Reader { 13 13 14 var$endian = 'little';15 var$_post = '';14 public $endian = 'little'; 15 public $_post = ''; 16 16 17 17 /** 18 18 * PHP5 constructor. … … if ( ! class_exists( 'POMO_StringReader', false ) ) : 226 226 */ 227 227 class POMO_StringReader extends POMO_Reader { 228 228 229 var$_str = '';229 public $_str = ''; 230 230 231 231 /** 232 232 * PHP5 constructor. -
src/wp-includes/pomo/translations.php
diff --git a/src/wp-includes/pomo/translations.php b/src/wp-includes/pomo/translations.php index d99037eaed..d93c6528f4 100644
a b require_once __DIR__ . '/entry.php'; 12 12 13 13 if ( ! class_exists( 'Translations', false ) ) : 14 14 class Translations { 15 var$entries = array();16 var$headers = array();15 public $entries = array(); 16 public $headers = array(); 17 17 18 18 /** 19 19 * Add entry to the PO structure … … if ( ! class_exists( 'NOOP_Translations', false ) ) : 301 301 * Provides the same interface as Translations, but doesn't do anything 302 302 */ 303 303 class NOOP_Translations { 304 var$entries = array();305 var$headers = array();304 public $entries = array(); 305 public $headers = array(); 306 306 307 307 function add_entry( $entry ) { 308 308 return true; -
src/wp-includes/wp-db.php
diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php index 80c117c1a0..5eabf8a540 100644
a b class wpdb { 61 61 * @since 0.71 62 62 * @var bool 63 63 */ 64 var$show_errors = false;64 public $show_errors = false; 65 65 66 66 /** 67 67 * Whether to suppress errors during the DB bootstrapping. Default false. … … class wpdb { 69 69 * @since 2.5.0 70 70 * @var bool 71 71 */ 72 var$suppress_errors = false;72 public $suppress_errors = false; 73 73 74 74 /** 75 75 * The error encountered during the last query. … … class wpdb { 101 101 * @since 0.71 102 102 * @var int 103 103 */ 104 var$rows_affected = 0;104 public $rows_affected = 0; 105 105 106 106 /** 107 107 * The ID generated for an AUTO_INCREMENT column by the last query (usually INSERT). … … class wpdb { 117 117 * @since 0.71 118 118 * @var string 119 119 */ 120 var$last_query;120 public $last_query; 121 121 122 122 /** 123 123 * Results of the last query. … … class wpdb { 125 125 * @since 0.71 126 126 * @var array|null 127 127 */ 128 var$last_result;128 public $last_result; 129 129 130 130 /** 131 131 * MySQL result, which is either a resource or boolean. … … class wpdb { 198 198 * } 199 199 * } 200 200 */ 201 var$queries;201 public $queries; 202 202 203 203 /** 204 204 * The number of times to retry reconnecting before dying. Default 5. … … class wpdb { 234 234 * @since 2.3.2 235 235 * @var bool 236 236 */ 237 var$ready = false;237 public $ready = false; 238 238 239 239 /** 240 240 * Blog ID. … … class wpdb { 259 259 * @see wpdb::tables() 260 260 * @var array 261 261 */ 262 var$tables = array(262 public $tables = array( 263 263 'posts', 264 264 'comments', 265 265 'links', … … class wpdb { 281 281 * @see wpdb::tables() 282 282 * @var array 283 283 */ 284 var$old_tables = array( 'categories', 'post2cat', 'link2cat' );284 public $old_tables = array( 'categories', 'post2cat', 'link2cat' ); 285 285 286 286 /** 287 287 * List of WordPress global tables. … … class wpdb { 290 290 * @see wpdb::tables() 291 291 * @var array 292 292 */ 293 var$global_tables = array( 'users', 'usermeta' );293 public $global_tables = array( 'users', 'usermeta' ); 294 294 295 295 /** 296 296 * List of Multisite global tables. … … class wpdb { 299 299 * @see wpdb::tables() 300 300 * @var array 301 301 */ 302 var$ms_global_tables = array(302 public $ms_global_tables = array( 303 303 'blogs', 304 304 'blogmeta', 305 305 'signups', -
tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php
diff --git a/tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php b/tests/phpunit/includes/factory/class-wp-unittest-generator-sequence.php index 5c0778f3d4..9391dd8bf7 100644
a b 1 1 <?php 2 2 3 3 class WP_UnitTest_Generator_Sequence { 4 static $incr = -1;4 public static $incr = -1; 5 5 public $next; 6 6 public $template_string; 7 7 -
tests/phpunit/includes/mock-mailer.php
diff --git a/tests/phpunit/includes/mock-mailer.php b/tests/phpunit/includes/mock-mailer.php index e5e3d98fa2..d02d2efc69 100644
a b require_once ABSPATH . 'wp-includes/PHPMailer/PHPMailer.php'; 3 3 require_once ABSPATH . 'wp-includes/PHPMailer/Exception.php'; 4 4 5 5 class MockPHPMailer extends PHPMailer\PHPMailer\PHPMailer { 6 var$mock_sent = array();6 public $mock_sent = array(); 7 7 8 8 function preSend() { 9 9 $this->Encoding = '8bit'; -
tests/phpunit/includes/testcase-canonical.php
diff --git a/tests/phpunit/includes/testcase-canonical.php b/tests/phpunit/includes/testcase-canonical.php index 655c0b0612..3866145589 100644
a b 1 1 <?php 2 2 3 3 class WP_Canonical_UnitTestCase extends WP_UnitTestCase { 4 static $old_current_user;5 static $author_id;6 static $post_ids = array();7 static $comment_ids = array();8 static $term_ids = array();9 static $terms = array();10 static $old_options = array();4 public static $old_current_user; 5 public static $author_id; 6 public static $post_ids = array(); 7 public static $comment_ids = array(); 8 public static $term_ids = array(); 9 public static $terms = array(); 10 public static $old_options = array(); 11 11 12 12 /** 13 13 * This can be defined in a subclass of this class which contains its own data() method. -
tests/phpunit/includes/utils.php
diff --git a/tests/phpunit/includes/utils.php b/tests/phpunit/includes/utils.php index 08b7c0f5d9..1546d4e973 100644
a b function strip_ws( $txt ) { 38 38 * add_action( 'foo', array( &$ma, 'action' ) ); 39 39 */ 40 40 class MockAction { 41 var$events;42 var$debug;41 public $events; 42 public $debug; 43 43 44 44 /** 45 45 * PHP5 constructor. … … class MockAction { 184 184 // Convert valid XML to an array tree structure. 185 185 // Kinda lame, but it works with a default PHP 4 installation. 186 186 class TestXMLParser { 187 var$xml;188 var$data = array();187 public $xml; 188 public $data = array(); 189 189 190 190 /** 191 191 * PHP5 constructor. -
tests/phpunit/tests/admin/includesScreen.php
diff --git a/tests/phpunit/tests/admin/includesScreen.php b/tests/phpunit/tests/admin/includesScreen.php index c482ae3711..ade4294c6b 100644
a b 5 5 * @group adminScreen 6 6 */ 7 7 class Tests_Admin_includesScreen extends WP_UnitTestCase { 8 var$core_screens = array(8 public $core_screens = array( 9 9 'index.php' => array( 10 10 'base' => 'dashboard', 11 11 'id' => 'dashboard', -
tests/phpunit/tests/cache.php
diff --git a/tests/phpunit/tests/cache.php b/tests/phpunit/tests/cache.php index 16206208da..b8c11b09df 100644
a b 4 4 * @group cache 5 5 */ 6 6 class Tests_Cache extends WP_UnitTestCase { 7 var$cache = null;7 public $cache = null; 8 8 9 9 function setUp() { 10 10 parent::setUp(); -
tests/phpunit/tests/feed/atom.php
diff --git a/tests/phpunit/tests/feed/atom.php b/tests/phpunit/tests/feed/atom.php index cc9a30af72..e8d308014c 100644
a b 9 9 * @group feed 10 10 */ 11 11 class Tests_Feeds_Atom extends WP_UnitTestCase { 12 static $user_id;13 static $posts;14 static $category;12 public static $user_id; 13 public static $posts; 14 public static $category; 15 15 16 16 /** 17 17 * Setup a new user and attribute some posts. -
tests/phpunit/tests/feed/rss2.php
diff --git a/tests/phpunit/tests/feed/rss2.php b/tests/phpunit/tests/feed/rss2.php index 8eda26e9d2..16fd4fe198 100644
a b 9 9 * @group feed 10 10 */ 11 11 class Tests_Feeds_RSS2 extends WP_UnitTestCase { 12 static $user_id;13 static $posts;14 static $category;15 static $post_date;12 public static $user_id; 13 public static $posts; 14 public static $category; 15 public static $post_date; 16 16 17 17 /** 18 18 * Setup a new user and attribute some posts. -
tests/phpunit/tests/functions/wpListFilter.php
diff --git a/tests/phpunit/tests/functions/wpListFilter.php b/tests/phpunit/tests/functions/wpListFilter.php index 24d43b504d..64abe90c44 100644
a b 8 8 * @covers ::wp_list_pluck 9 9 */ 10 10 class Tests_Functions_wpListFilter extends WP_UnitTestCase { 11 var$object_list = array();12 var$array_list = array();11 public $object_list = array(); 12 public $array_list = array(); 13 13 14 14 function setUp() { 15 15 parent::setUp(); -
tests/phpunit/tests/http/base.php
diff --git a/tests/phpunit/tests/http/base.php b/tests/phpunit/tests/http/base.php index 0919f91ac0..c7cce5bad2 100644
a b 12 12 */ 13 13 abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase { 14 14 // You can use your own version of data/WPHTTP-testcase-redirection-script.php here. 15 var$redirection_script = 'http://api.wordpress.org/core/tests/1.0/redirection.php';16 var$file_stream_url = 'http://s.w.org/screenshots/3.9/dashboard.png';15 public $redirection_script = 'http://api.wordpress.org/core/tests/1.0/redirection.php'; 16 public $file_stream_url = 'http://s.w.org/screenshots/3.9/dashboard.png'; 17 17 18 18 protected $http_request_args; 19 19 -
tests/phpunit/tests/http/curl.php
diff --git a/tests/phpunit/tests/http/curl.php b/tests/phpunit/tests/http/curl.php index 271e6dd698..ceee347aa8 100644
a b require_once __DIR__ . '/base.php'; 7 7 * @group external-http 8 8 */ 9 9 class Tests_HTTP_curl extends WP_HTTP_UnitTestCase { 10 var$transport = 'curl';10 public $transport = 'curl'; 11 11 12 12 /** 13 13 * @ticket 39783 -
tests/phpunit/tests/http/streams.php
diff --git a/tests/phpunit/tests/http/streams.php b/tests/phpunit/tests/http/streams.php index 61fcc11925..9ae1b30512 100644
a b require_once __DIR__ . '/base.php'; 7 7 * @group external-http 8 8 */ 9 9 class Tests_HTTP_streams extends WP_HTTP_UnitTestCase { 10 var$transport = 'streams';10 public $transport = 'streams'; 11 11 } -
tests/phpunit/tests/image/header.php
diff --git a/tests/phpunit/tests/image/header.php b/tests/phpunit/tests/image/header.php index d378dddb2d..897c68e5fa 100644
a b require_once ABSPATH . 'wp-admin/includes/class-custom-image-header.php'; 6 6 * @group header 7 7 */ 8 8 class Tests_Image_Header extends WP_UnitTestCase { 9 var$custom_image_header;9 public $custom_image_header; 10 10 11 11 function setUp() { 12 12 parent::setUp(); -
tests/phpunit/tests/link/getDashboardUrl.php
diff --git a/tests/phpunit/tests/link/getDashboardUrl.php b/tests/phpunit/tests/link/getDashboardUrl.php index be051b3027..9495c6f546 100644
a b 4 4 * @group link 5 5 */ 6 6 class Tests_Link_GetDashboardUrl extends WP_UnitTestCase { 7 static $user_id = false;7 public static $user_id = false; 8 8 9 9 public static function wpSetUpBeforeClass( $factory ) { 10 10 self::$user_id = $factory->user->create( array( 'role' => 'administrator' ) ); -
tests/phpunit/tests/multisite/wpMSSitesListTable.php
diff --git a/tests/phpunit/tests/multisite/wpMSSitesListTable.php b/tests/phpunit/tests/multisite/wpMSSitesListTable.php index a49369cca5..b9dc73cdb0 100644
a b if ( is_multisite() ) : 12 12 /** 13 13 * @var WP_MS_Sites_List_Table 14 14 */ 15 var$table = false;15 public $table = false; 16 16 17 17 function setUp() { 18 18 parent::setUp(); -
tests/phpunit/tests/query/commentCount.php
diff --git a/tests/phpunit/tests/query/commentCount.php b/tests/phpunit/tests/query/commentCount.php index fd72740f7b..29d3f3cad6 100644
a b 3 3 * @group query 4 4 */ 5 5 class Tests_Query_CommentCount extends WP_UnitTestCase { 6 static $post_ids = array();6 public static $post_ids = array(); 7 7 public $q; 8 static $post_type = 'page'; // Can be anything.8 public static $post_type = 'page'; // Can be anything. 9 9 10 10 public function setUp() { 11 11 parent::setUp(); -
tests/phpunit/tests/query/date.php
diff --git a/tests/phpunit/tests/query/date.php b/tests/phpunit/tests/query/date.php index 0372233cfb..17d5dc5aa3 100644
a b class Tests_Query_Date extends WP_UnitTestCase { 10 10 11 11 public $q; 12 12 13 static $post_ids = array();13 public static $post_ids = array(); 14 14 15 15 public static function wpSetUpBeforeClass( $factory ) { 16 16 // Be careful modifying this. Tests are coded to expect this exact sample data. -
tests/phpunit/tests/query/results.php
diff --git a/tests/phpunit/tests/query/results.php b/tests/phpunit/tests/query/results.php index eb801249ab..e284e3417b 100644
a b 9 9 class Tests_Query_Results extends WP_UnitTestCase { 10 10 protected $q; 11 11 12 static $cat_ids = array();13 static $tag_ids = array();14 static $post_ids = array();15 16 static $parent_one;17 static $parent_two;18 static $parent_three;19 static $child_one;20 static $child_two;21 static $child_three;22 static $child_four;12 public static $cat_ids = array(); 13 public static $tag_ids = array(); 14 public static $post_ids = array(); 15 16 public static $parent_one; 17 public static $parent_two; 18 public static $parent_three; 19 public static $child_one; 20 public static $child_two; 21 public static $child_three; 22 public static $child_four; 23 23 24 24 public static function wpSetUpBeforeClass( $factory ) { 25 25 $cat_a = $factory->term->create( -
tests/phpunit/tests/query/stickies.php
diff --git a/tests/phpunit/tests/query/stickies.php b/tests/phpunit/tests/query/stickies.php index 2dc285ade3..306c1a6876 100644
a b 6 6 * @group query 7 7 */ 8 8 class Tests_Query_Stickies extends WP_UnitTestCase { 9 static $posts = array();9 public static $posts = array(); 10 10 11 11 public static function wpSetUpBeforeClass( $factory ) { 12 12 // Set post times to get a reliable order. -
tests/phpunit/tests/theme/customHeader.php
diff --git a/tests/phpunit/tests/theme/customHeader.php b/tests/phpunit/tests/theme/customHeader.php index 229b85dec1..34a30496e9 100644
a b 4 4 */ 5 5 class Tests_Theme_Custom_Header extends WP_UnitTestCase { 6 6 7 static $post;7 public static $post; 8 8 9 9 protected static $header_video_id; 10 10 -
tests/phpunit/tests/upload.php
diff --git a/tests/phpunit/tests/upload.php b/tests/phpunit/tests/upload.php index 8fe2f9e91d..43cd1e338a 100644
a b 5 5 */ 6 6 class Tests_Upload extends WP_UnitTestCase { 7 7 8 var$siteurl;8 public $siteurl; 9 9 10 10 function setUp() { 11 11 $this->_reset_options(); -
tests/phpunit/tests/user/countUserPosts.php
diff --git a/tests/phpunit/tests/user/countUserPosts.php b/tests/phpunit/tests/user/countUserPosts.php index a3ed4c305f..3ddd3b4da0 100644
a b 5 5 * @group post 6 6 */ 7 7 class Tests_User_CountUserPosts extends WP_UnitTestCase { 8 static $user_id;9 static $post_ids = array();8 public static $user_id; 9 public static $post_ids = array(); 10 10 11 11 public static function wpSetUpBeforeClass( $factory ) { 12 12 self::$user_id = $factory->user->create( -
tests/phpunit/tests/user/getActiveBlogForUser.php
diff --git a/tests/phpunit/tests/user/getActiveBlogForUser.php b/tests/phpunit/tests/user/getActiveBlogForUser.php index 0d13583ae0..6476e3ac63 100644
a b if ( is_multisite() ) : 10 10 * @group multisite 11 11 */ 12 12 class Tests_Multisite_getActiveBlogForUser extends WP_UnitTestCase { 13 static $user_id = false;13 public static $user_id = false; 14 14 15 15 public static function wpSetUpBeforeClass( $factory ) { 16 16 self::$user_id = $factory->user->create(); -
tests/phpunit/tests/user/listAuthors.php
diff --git a/tests/phpunit/tests/user/listAuthors.php b/tests/phpunit/tests/user/listAuthors.php index 8908b39d0b..35c3e91211 100644
a b 4 4 * @group user 5 5 */ 6 6 class Tests_User_ListAuthors extends WP_UnitTestCase { 7 static $user_ids = array();8 static $fred_id;9 static $posts = array();10 static $user_urls = array();7 public static $user_ids = array(); 8 public static $fred_id; 9 public static $posts = array(); 10 public static $user_urls = array(); 11 11 /* Defaults 12 12 'orderby' => 'name', 13 13 'order' => 'ASC', -
tests/phpunit/tests/walker.php
diff --git a/tests/phpunit/tests/walker.php b/tests/phpunit/tests/walker.php index 5ab08b1579..c40db21a90 100644
a b class Tests_Walker extends WP_UnitTestCase { 286 286 287 287 class Walker_Test extends Walker { 288 288 289 var$tree_type = 'test';290 var$db_fields = array(289 public $tree_type = 'test'; 290 public $db_fields = array( 291 291 'parent' => 'parent', 292 292 'id' => 'id', 293 293 ); -
tests/phpunit/tests/xmlrpc/wp/getComments.php
diff --git a/tests/phpunit/tests/xmlrpc/wp/getComments.php b/tests/phpunit/tests/xmlrpc/wp/getComments.php index 07d78e0b0f..5ec958762f 100644
a b 4 4 * @group xmlrpc 5 5 */ 6 6 class Tests_XMLRPC_wp_getComments extends WP_XMLRPC_UnitTestCase { 7 var$post_id;7 public $post_id; 8 8 9 9 function test_invalid_username_password() { 10 10 $result = $this->myxmlrpcserver->wp_getComments( array( 1, 'username', 'password', array() ) ); -
tests/phpunit/tests/xmlrpc/wp/getMediaItem.php
diff --git a/tests/phpunit/tests/xmlrpc/wp/getMediaItem.php b/tests/phpunit/tests/xmlrpc/wp/getMediaItem.php index 6312cdda44..26b2ac4aa1 100644
a b 6 6 class Tests_XMLRPC_wp_getMediaItem extends WP_XMLRPC_UnitTestCase { 7 7 protected static $post_id; 8 8 9 var$attachment_data;10 var$attachment_id;9 public $attachment_data; 10 public $attachment_id; 11 11 12 12 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { 13 13 self::$post_id = $factory->post->create(); -
tests/phpunit/tests/xmlrpc/wp/getPost.php
diff --git a/tests/phpunit/tests/xmlrpc/wp/getPost.php b/tests/phpunit/tests/xmlrpc/wp/getPost.php index 30b8addf6c..6752677d97 100644
a b 4 4 * @group xmlrpc 5 5 */ 6 6 class Tests_XMLRPC_wp_getPost extends WP_XMLRPC_UnitTestCase { 7 var$post_data;8 var$post_id;9 var$post_date_ts;10 var$post_custom_field;7 public $post_data; 8 public $post_id; 9 public $post_date_ts; 10 public $post_custom_field; 11 11 12 12 function setUp() { 13 13 parent::setUp(); -
tests/phpunit/tests/xmlrpc/wp/getPostType.php
diff --git a/tests/phpunit/tests/xmlrpc/wp/getPostType.php b/tests/phpunit/tests/xmlrpc/wp/getPostType.php index 3781dc0674..cfff2320fc 100644
a b 4 4 * @group xmlrpc 5 5 */ 6 6 class Tests_XMLRPC_wp_getPostType extends WP_XMLRPC_UnitTestCase { 7 var$cpt_name;8 var$cpt_args;7 public $cpt_name; 8 public $cpt_args; 9 9 10 10 function setUp() { 11 11 parent::setUp(); -
tests/phpunit/tests/xmlrpc/wp/restoreRevision.php
diff --git a/tests/phpunit/tests/xmlrpc/wp/restoreRevision.php b/tests/phpunit/tests/xmlrpc/wp/restoreRevision.php index b3ef2731a2..e89e1f988c 100644
a b 4 4 * @group xmlrpc 5 5 */ 6 6 class Tests_XMLRPC_wp_restoreRevision extends WP_XMLRPC_UnitTestCase { 7 var$post_id;8 var$revision_id;7 public $post_id; 8 public $revision_id; 9 9 10 10 function setUp() { 11 11 parent::setUp();