WordPress.org

Make WordPress Core

Changeset 942 in tests


Ignore:
Timestamp:
07/27/2012 06:52:16 PM (6 years ago)
Author:
scribu
Message:

test isset() and unset() for get_post() result

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/post/objects.php

    r940 r942  
    1212
    1313        $this->assertEquals( $id, $post->ID );
     14
     15        $this->assertTrue( isset( $post->post_type ) );
     16        $this->assertEquals( 'post', $post->post_type );
     17
     18        unset( $post->post_type );
     19        $this->assertFalse( isset( $post->post_type ) );
    1420    }
    1521
Note: See TracChangeset for help on using the changeset viewer.