Changeset 45607 for trunk/tests/phpunit/tests/multisite/site.php
- Timestamp:
- 07/08/2019 12:55:20 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/multisite/site.php
r44806 r45607 167 167 // Check existence of each database table for the created site. 168 168 foreach ( $wpdb->tables( 'blog', false ) as $table ) { 169 $suppress = $wpdb->suppress_errors(); 169 $suppress = $wpdb->suppress_errors(); 170 171 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 170 172 $table_fields = $wpdb->get_results( "DESCRIBE $prefix$table;" ); 173 171 174 $wpdb->suppress_errors( $suppress ); 172 175 … … 175 178 176 179 // And the table should not be empty, unless commentmeta, termmeta, or links. 180 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 177 181 $result = $wpdb->get_results( "SELECT * FROM $prefix$table LIMIT 1" ); 178 if ( 'commentmeta' == $table || 'termmeta' == $table || 'links' == $table ) { 182 183 if ( 'commentmeta' === $table || 'termmeta' === $table || 'links' === $table ) { 179 184 $this->assertEmpty( $result ); 180 185 } else { … … 245 250 $prefix = $wpdb->get_blog_prefix( $blog_id ); 246 251 foreach ( $wpdb->tables( 'blog', false ) as $table ) { 247 $suppress = $wpdb->suppress_errors(); 252 $suppress = $wpdb->suppress_errors(); 253 254 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 248 255 $table_fields = $wpdb->get_results( "DESCRIBE $prefix$table;" ); 256 249 257 $wpdb->suppress_errors( $suppress ); 250 258 $this->assertNotEmpty( $table_fields, $prefix . $table ); … … 283 291 $prefix = $wpdb->get_blog_prefix( $blog_id ); 284 292 foreach ( $wpdb->tables( 'blog', false ) as $table ) { 285 $suppress = $wpdb->suppress_errors(); 293 $suppress = $wpdb->suppress_errors(); 294 295 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 286 296 $table_fields = $wpdb->get_results( "DESCRIBE $prefix$table;" ); 297 287 298 $wpdb->suppress_errors( $suppress ); 288 299 $this->assertEmpty( $table_fields ); … … 321 332 $prefix = $wpdb->get_blog_prefix( $blog_id ); 322 333 foreach ( $wpdb->tables( 'blog', false ) as $table ) { 323 $suppress = $wpdb->suppress_errors(); 334 $suppress = $wpdb->suppress_errors(); 335 336 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 324 337 $table_fields = $wpdb->get_results( "DESCRIBE $prefix$table;" ); 338 325 339 $wpdb->suppress_errors( $suppress ); 326 340 $this->assertNotEmpty( $table_fields, $prefix . $table ); … … 856 870 */ 857 871 function _domain_exists_cb( $exists, $domain, $path, $site_id ) { 858 if ( 'foo' == $domain && 'bar/'== $path ) {872 if ( 'foo' === $domain && 'bar/' === $path ) { 859 873 return 1234; 860 874 } else {
Note: See TracChangeset
for help on using the changeset viewer.