WordPress.org

Make WordPress Core

Changeset 30522


Ignore:
Timestamp:
11/22/2014 08:41:04 PM (5 years ago)
Author:
boonebgorges
Message:

Remove failing test related to wp_unique_post_slug().

The test has been added as a patch to #18962.

See #30284.

File:
1 edited

Legend:

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

    r30510 r30522  
    987987
    988988    /**
    989      * @ticket 18962
    990      */
    991     function test_wp_unique_post_slug_with_hierarchy_and_attachments() {
    992         register_post_type( 'post-type-1', array( 'hierarchical' => true ) );
    993 
    994         $args = array(
    995             'post_type' => 'post-type-1',
    996             'post_name' => 'some-slug',
    997             'post_status' => 'publish',
    998         );
    999         $one = $this->factory->post->create( $args );
    1000 
    1001         $args = array(
    1002             'post_mime_type' => 'image/jpeg',
    1003             'post_type' => 'attachment',
    1004             'post_name' => 'image'
    1005         );
    1006         $attachment = $this->factory->attachment->create_object( 'image.jpg', $one, $args );
    1007 
    1008         $args = array(
    1009             'post_type' => 'post-type-1',
    1010             'post_name' => 'image',
    1011             'post_status' => 'publish',
    1012             'post_parent' => $one
    1013         );
    1014         $two = $this->factory->post->create( $args );
    1015 
    1016         $this->assertEquals( 'some-slug', get_post( $one )->post_name );
    1017         $this->assertEquals( 'image', get_post( $attachment )->post_name );
    1018         $this->assertEquals( 'image-2', get_post( $two )->post_name );
    1019 
    1020         // 'image' can be a child of image-2
    1021         $this->assertEquals( 'image', wp_unique_post_slug( 'image', 0, 'publish', 'post-type-1', $two ) );
    1022 
    1023         _unregister_post_type( 'post-type-1' );
    1024     }
    1025 
    1026     /**
    1027989     * @ticket 21212
    1028990     */
Note: See TracChangeset for help on using the changeset viewer.