Make WordPress Core


Ignore:
Timestamp:
02/21/2020 01:05:39 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Build/Test Tools: Fix the Travis CI build for the 3.8 branch.

Among other fixes, this backports [26871], [26909-26910], [26940], [27086], [27168], [28799], [28873], [28943], [28961], [28964], [28966-28967], [29120], [29251], [29503], [29860], [29869], [29954], [30001], [30160], [30282], [30285], [30289-30291], [30513-30514], [30516-30521], [30524], [30526], [30529-30530], [31253-31254], [31257-31259], [31622], [40241], [40255], [40257], [40259], [40269], [40271], [40446], [40449], [40457], [40604], [40538], [40833], [41082], [41303], [41306], [44993].

See #49485.

Location:
branches/3.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.8

  • branches/3.8/tests/phpunit/tests/taxonomy.php

    r25923 r47338  
    106106
    107107    /**
    108      * @ticket 11058
    109      */
    110     function test_registering_taxonomies_to_object_types() {
    111         // Create a taxonomy to test with
    112         $tax = 'test_tax';
    113         $this->assertFalse( taxonomy_exists($tax) );
    114         register_taxonomy( $tax, 'post', array( 'hierarchical' => true ) );
    115 
    116         // Create a post type to test with
    117         $post_type = 'test_cpt';
    118         $this->assertFalse( get_post_type( $post_type ) );
    119         $this->assertObjectHasAttribute( 'name', register_post_type( $post_type ) );
    120 
    121         // Core taxonomy, core post type
    122         $this->assertTrue( unregister_taxonomy_for_object_type( 'category', 'post' ) );
    123         $this->assertFalse( unregister_taxonomy_for_object_type( 'category', 'post' ) );
    124         $this->assertTrue( register_taxonomy_for_object_type( 'category', 'post' ) );
    125 
    126         // Core taxonomy, non-core post type
    127         $this->assertTrue( register_taxonomy_for_object_type( 'category', $post_type ) );
    128         $this->assertTrue( unregister_taxonomy_for_object_type( 'category', $post_type ) );
    129         $this->assertFalse( unregister_taxonomy_for_object_type( 'category', $post_type ) );
    130         $this->assertTrue( register_taxonomy_for_object_type( 'category', $post_type ) );
    131 
    132         // Core taxonomies, non-post object types
    133         $this->assertFalse( register_taxonomy_for_object_type( 'category', 'user' ) );
    134         $this->assertFalse( unregister_taxonomy_for_object_type( 'category', 'user' ) );
    135 
    136         // Non-core taxonomy, core post type
    137         $this->assertTrue( unregister_taxonomy_for_object_type( $tax, 'post' ) );
    138         $this->assertFalse( unregister_taxonomy_for_object_type( $tax, 'post' ) );
    139         $this->assertTrue( register_taxonomy_for_object_type( $tax, 'post' ) );
    140 
    141         // Non-core taxonomy, non-core post type
    142         $this->assertTrue( register_taxonomy_for_object_type( $tax, $post_type ) );
    143         $this->assertTrue( unregister_taxonomy_for_object_type( $tax, $post_type ) );
    144         $this->assertFalse( unregister_taxonomy_for_object_type( $tax, $post_type ) );
    145         $this->assertTrue( register_taxonomy_for_object_type( $tax, $post_type ) );
    146 
    147         // Non-core taxonomies, non-post object types
    148         $this->assertFalse( register_taxonomy_for_object_type( $tax, 'user' ) );
    149         $this->assertFalse( unregister_taxonomy_for_object_type( $tax, 'user' ) );
    150 
    151         unset($GLOBALS['wp_taxonomies'][$tax]);
    152         _unregister_post_type( $post_type );
    153 
    154     }
    155     /**
    156108     * @ticket 25706
    157109     */
Note: See TracChangeset for help on using the changeset viewer.