WordPress.org

Make WordPress Core

Changeset 30704


Ignore:
Timestamp:
12/02/2014 05:11:49 AM (6 years ago)
Author:
pento
Message:

Unit Tests: The test_set_allowed_incompatible_sql_mode() test tries to set the NO_ZERO_DATE sql mode, which was removed in MySQL 5.7. This causes the test to incorrectly fail when run against MySQL 5.7.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/db.php

    r30587 r30704  
    318318        $current_modes = $wpdb->get_var( 'SELECT @@SESSION.sql_mode;' );
    319319
    320         $new_modes = array( 'IGNORE_SPACE', 'NO_ZERO_DATE', 'NO_AUTO_CREATE_USER' );
     320        $new_modes = array( 'IGNORE_SPACE', 'ONLY_FULL_GROUP_BY', 'NO_AUTO_CREATE_USER' );
    321321
    322322        add_filter( 'incompatible_sql_modes', array( $this, 'filter_allowed_incompatible_sql_mode' ), 1, 1 );
     
    325325
    326326        $check_new_modes = $wpdb->get_var( 'SELECT @@SESSION.sql_mode;' );
    327         $this->assertContains( 'NO_ZERO_DATE', explode( ',', $check_new_modes ) );
     327        $this->assertContains( 'ONLY_FULL_GROUP_BY', explode( ',', $check_new_modes ) );
    328328
    329329        $wpdb->set_sql_mode( explode( ',', $current_modes ) );
     
    331331
    332332    public function filter_allowed_incompatible_sql_mode( $modes ) {
    333         $pos = array_search( 'NO_ZERO_DATE', $modes );
     333        $pos = array_search( 'ONLY_FULL_GROUP_BY', $modes );
    334334        $this->assertGreaterThanOrEqual( 0, $pos );
    335335
Note: See TracChangeset for help on using the changeset viewer.