WordPress.org

Make WordPress Core

Changeset 1024 in tests


Ignore:
Timestamp:
09/18/12 21:52:27 (19 months ago)
Author:
bpetty
Message:

Suppress SQL errors on test queries that are meant to fail when tables don't exist (but are still handled correctly).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/ms.php

    r1013 r1024  
    2121 
    2222            foreach ( $wpdb->tables( 'blog', false ) as $table ) { 
     23                $wpdb->suppress_errors(); 
    2324                $table_fields = $wpdb->get_results( "DESCRIBE $prefix$table;" ); 
     25                $wpdb->suppress_errors( false ); 
    2426                $this->assertNotEmpty( $table_fields ); 
    2527                $result = $wpdb->get_results( "SELECT * FROM $prefix$table LIMIT 1" ); 
     
    4446            $prefix = $wpdb->get_blog_prefix( $blog_id ); 
    4547            foreach ( $wpdb->tables( 'blog', false ) as $table ) { 
     48                $wpdb->suppress_errors(); 
    4649                $table_fields = $wpdb->get_results( "DESCRIBE $prefix$table;" ); 
     50                $wpdb->suppress_errors( false ); 
    4751                if ( $drop_tables ) 
    4852                    $this->assertEmpty( $table_fields ); 
Note: See TracChangeset for help on using the changeset viewer.