Changeset 45607 for trunk/tests/phpunit/tests/ajax/DeleteComment.php
- Timestamp:
- 07/08/2019 12:55:20 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ajax/DeleteComment.php
r42343 r45607 95 95 96 96 // trash, spam, delete should make the total go down 97 if ( in_array( $action, array( 'trash', 'spam', 'delete' ) ) ) {97 if ( in_array( $action, array( 'trash', 'spam', 'delete' ), true ) ) { 98 98 $total = $_POST['_total'] - 1; 99 99 100 100 // unspam, untrash should make the total go up 101 } elseif ( in_array( $action, array( 'untrash', 'unspam' ) ) ) {101 } elseif ( in_array( $action, array( 'untrash', 'unspam' ), true ) ) { 102 102 $total = $_POST['_total'] + 1; 103 103 } … … 109 109 // Check for either possible total 110 110 $message = sprintf( 'returned value: %1$d $total: %2$d $recalc_total: %3$d', (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], $total, $recalc_total ); 111 $this->assertTrue( in_array( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ) ), $message );111 $this->assertTrue( in_array( (int) $xml->response[0]->comment[0]->supplemental[0]->total[0], array( $total, $recalc_total ), true ), $message ); 112 112 } 113 113 … … 244 244 245 245 // Force delete the comment 246 if ( 'delete' == $action ) {246 if ( 'delete' === $action ) { 247 247 wp_delete_comment( $comment->comment_ID, true ); 248 248 }
Note: See TracChangeset
for help on using the changeset viewer.