Make WordPress Core


Ignore:
Timestamp:
05/19/2014 06:48:56 AM (12 years ago)
Author:
wonderboymusic
Message:

Add missing access modifiers to methods in WP_Query. Add magic methods for __get(), __set(), __isset(), __unset(), and __call().

Add unit test for magic methods.

See #27881, #22234.

File:
1 edited

Legend:

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

    r28493 r28523  
    146146        $this->assertEquals( 'maybe', $basic->callMe() );
    147147    }
     148
     149    function test_subclass_isset() {
     150        $basic = new Basic_Subclass();
     151
     152        $this->assertTrue( isset( $basic->foo ) );
     153    }
     154
     155    function test_subclass_unset() {
     156        $basic = new Basic_Subclass();
     157
     158        unset( $basic->foo );
     159
     160        $this->assertFalse( isset( $basic->foo ) );
     161    }
    148162}
Note: See TracChangeset for help on using the changeset viewer.