Changeset 45607 for trunk/tests/phpunit/includes/utils.php
- Timestamp:
- 07/08/2019 12:55:20 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/utils.php
r45580 r45607 153 153 $count = 0; 154 154 foreach ( $this->events as $e ) { 155 if ( $e['action'] == $tag ) {155 if ( $e['action'] === $tag ) { 156 156 ++$count; 157 157 } … … 223 223 224 224 function data_handler( $parser, $data ) { 225 $index = count( $this->data ) - 1; 226 @$this->data[ $index ]['content'] .= $data; 225 $index = count( $this->data ) - 1; 226 227 if ( ! isset( $this->data[ $index ]['content'] ) ) { 228 $this->data[ $index ]['content'] = ''; 229 } 230 $this->data[ $index ]['content'] .= $data; 227 231 } 228 232 … … 254 258 # echo "checking '{$tree[$i][name]}' == '{$a[0]}'\n"; 255 259 # var_dump($tree[$i]['name'], $a[0]); 256 if ( $tree[ $i ]['name'] == $a[0] ) {260 if ( $tree[ $i ]['name'] === $a[0] ) { 257 261 # echo "n == {$n}\n"; 258 if ( $n == 1) {262 if ( 1 === $n ) { 259 263 $out[] = $tree[ $i ]; 260 264 } else { … … 349 353 $tables = $wpdb->get_col( 'SHOW TABLES;' ); 350 354 foreach ( $tables as $table ) { 355 // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared 351 356 $wpdb->query( "DROP TABLE IF EXISTS {$table}" ); 352 357 } … … 439 444 * Special class for exposing protected wpdb methods we need to access 440 445 */ 441 class wpdb_exposed_methods_for_testing extends wpdb {446 class WpdbExposedMethodsForTesting extends wpdb { 442 447 public function __construct() { 443 448 global $wpdb;
Note: See TracChangeset
for help on using the changeset viewer.