WordPress.org

Make WordPress Core

Ticket #24800: 24800.diff

File 24800.diff, 933 bytes (added by soulseekah, 5 years ago)
  • includes/testcase.php

     
    2929        function tearDown() {
    3030                global $wpdb;
    3131                $wpdb->query( 'ROLLBACK' );
    32                 remove_filter( 'dbdelta_create_queries', array( $this, '_create_temporary_tables' ) );
     32                remove_filter( 'query', array( $this, '_create_temporary_tables' ) );
    3333                remove_filter( 'query', array( $this, '_drop_temporary_tables' ) );
    3434                remove_filter( 'wp_die_handler', array( $this, 'get_wp_die_handler' ) );
    3535        }
     
    5656                global $wpdb;
    5757                $wpdb->query( 'SET autocommit = 0;' );
    5858                $wpdb->query( 'START TRANSACTION;' );
    59                 add_filter( 'dbdelta_create_queries', array( $this, '_create_temporary_tables' ) );
     59                add_filter( 'query', array( $this, '_create_temporary_tables' ) );
    6060                add_filter( 'query', array( $this, '_drop_temporary_tables' ) );
    6161        }
    6262