WordPress.org

Make WordPress Core

Changeset 971 in tests


Ignore:
Timestamp:
08/14/12 20:31:57 (20 months ago)
Author:
nacin
Message:

wpdb tests for [WP21512] and #WP18510.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/db.php

    r909 r971  
    7979        setlocale( LC_ALL, $current_locale ); 
    8080    } 
     81 
     82    /** 
     83     * @ticket 18510 
     84     */ 
     85    function test_wpdb_supposedly_protected_properties() { 
     86        global $wpdb; 
     87 
     88        $this->assertNotEmpty( $wpdb->dbh ); 
     89        $dbh = $wpdb->dbh; 
     90        $this->assertNotEmpty( $dbh ); 
     91        $this->assertTrue( isset( $wpdb->dbh ) ); // Test __isset() 
     92        unset( $wpdb->dbh ); 
     93        $this->assertNull( $wpdb->dbh ); 
     94        $wpdb->dbh = $dbh; 
     95        $this->assertNotEmpty( $wpdb->dbh ); 
     96    } 
    8197} 
Note: See TracChangeset for help on using the changeset viewer.