Changeset 42343 for trunk/tests/phpunit/tests/post/wpPostType.php
- Timestamp:
- 11/30/2017 11:09:33 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/post/wpPostType.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/wpPostType.php
r39919 r42343 23 23 $post_type_supports_after = get_all_post_type_supports( $post_type ); 24 24 25 $this->assertEqualSets( array( 'title' => true, 'editor' => true ), $post_type_supports ); 25 $this->assertEqualSets( 26 array( 27 'title' => true, 28 'editor' => true, 29 ), $post_type_supports 30 ); 26 31 $this->assertEqualSets( array(), $post_type_supports_after ); 27 32 } … … 29 34 public function test_add_supports_custom() { 30 35 $post_type = 'cpt'; 31 $post_type_object = new WP_Post_Type( $post_type, array( 32 'supports' => array( 33 'editor', 34 'comments', 35 'revisions', 36 ), 37 ) ); 36 $post_type_object = new WP_Post_Type( 37 $post_type, array( 38 'supports' => array( 39 'editor', 40 'comments', 41 'revisions', 42 ), 43 ) 44 ); 38 45 39 46 $post_type_object->add_supports(); … … 43 50 $post_type_supports_after = get_all_post_type_supports( $post_type ); 44 51 45 $this->assertEqualSets( array( 46 'editor' => true, 47 'comments' => true, 48 'revisions' => true, 49 ), $post_type_supports ); 52 $this->assertEqualSets( 53 array( 54 'editor' => true, 55 'comments' => true, 56 'revisions' => true, 57 ), $post_type_supports 58 ); 50 59 $this->assertEqualSets( array(), $post_type_supports_after ); 51 60 } … … 58 67 59 68 $post_type = 'cpt'; 60 $post_type_object = new WP_Post_Type( $post_type, array( 'rewrite' => false, 'query_var' => 'foobar' ) ); 69 $post_type_object = new WP_Post_Type( 70 $post_type, array( 71 'rewrite' => false, 72 'query_var' => 'foobar', 73 ) 74 ); 61 75 $post_type_object->add_rewrite_rules(); 62 76 … … 71 85 72 86 $post_type = 'cpt'; 73 $post_type_object = new WP_Post_Type( $post_type, array( 74 'public' => true, 75 'rewrite' => false, 76 'query_var' => 'foobar', 77 ) ); 87 $post_type_object = new WP_Post_Type( 88 $post_type, array( 89 'public' => true, 90 'rewrite' => false, 91 'query_var' => 'foobar', 92 ) 93 ); 78 94 79 95 $post_type_object->add_rewrite_rules(); … … 94 110 95 111 $post_type = 'cpt'; 96 $post_type_object = new WP_Post_Type( $post_type, array( 'public' => true, 'rewrite' => true ) ); 112 $post_type_object = new WP_Post_Type( 113 $post_type, array( 114 'public' => true, 115 'rewrite' => true, 116 ) 117 ); 97 118 98 119 $post_type_object->add_rewrite_rules();
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)