[wp-trac] [WordPress Trac] #33023: Error wp-includes/post.php in _get_custom_object_labels

WordPress Trac noreply at wordpress.org
Fri Sep 11 05:59:37 UTC 2015


#33023: Error wp-includes/post.php in _get_custom_object_labels
--------------------------+------------------------------
 Reporter:  zsiteru       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.2.2
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------
Changes (by Toro_Unit):

 * keywords:   => has-patch


Comment:

 Add Test Case.
 {{{
 <?php
 class SampleTest extends WP_UnitTestCase {
         function test_sample() {
                 $args = array(
                         'public' => true,
                         'label'  => 'Books'
                 );
                 register_post_type( 'book', $args );
                 $pre = get_post_type_object( 'book' )->labels;
                 get_post_type_labels( get_post_type_object( 'book' ) );
                 $post = get_post_type_object( 'book' )->labels;
                 $this->assertEquals( $pre, $post ); // fail !!!!
         }
 }

 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33023#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list