Make WordPress Core


Ignore:
Timestamp:
09/05/2013 10:02:42 PM (13 years ago)
Author:
nacin
Message:

Add a test case for calling get_page_uri() with a non-existent post.

see #24491, [25262].

File:
1 edited

Legend:

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

    r25244 r25265  
    605605
    606606        /**
     607         * @ticket 24491
     608         */
     609        function test_get_page_uri_with_nonexistent_post() {
     610                global $wpdb;
     611                $post_id = $wpdb->get_var( "SELECT MAX(ID) FROM $wpdb->posts" ) + 1;
     612                $this->assertFalse( get_page_uri( $post_id ) );
     613        }
     614
     615        /**
    607616         * @ticket 23708
    608617         */
Note: See TracChangeset for help on using the changeset viewer.