Make WordPress Core

Changeset 978 in tests


Ignore:
Timestamp:
08/20/2012 09:49:43 PM (13 years ago)
Author:
nacin
Message:

Add a test for a non-declared wpdb property. see #WP18510.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/db.php

    r971 r978  
    9595        $this->assertNotEmpty( $wpdb->dbh );
    9696    }
     97
     98    /**
     99     * @ticket 18510
     100     */
     101    function test_wpdb_nonexistent_properties() {
     102        global $wpdb;
     103
     104        $this->assertNull( $wpdb->nonexistent_property );
     105        $wpdb->nonexistent_property = true;
     106        $this->assertTrue( $wpdb->nonexistent_property );
     107        $this->assertTrue( isset( $wpdb->nonexistent_property ) );
     108        unset( $wpdb->nonexistent_property );
     109        $this->assertNull( $wpdb->nonexistent_property );
     110    }
    97111}
Note: See TracChangeset for help on using the changeset viewer.