Changeset 42343 for trunk/tests/phpunit/tests/ajax/QuickEdit.php
- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ajax/QuickEdit.php
r37954 r42343 17 17 */ 18 18 public function test_dont_process_terms_if_taxonomy_does_not_allow_show_on_quick_edit() { 19 register_taxonomy( 'wptests_tax_1', 'post', array( 20 'show_in_quick_edit' => false, 21 'hierarchical' => true, 22 ) ); 23 register_taxonomy( 'wptests_tax_2', 'post', array( 24 'show_in_quick_edit' => true, 25 'hierarchical' => true, 26 ) ); 19 register_taxonomy( 20 'wptests_tax_1', 'post', array( 21 'show_in_quick_edit' => false, 22 'hierarchical' => true, 23 ) 24 ); 25 register_taxonomy( 26 'wptests_tax_2', 'post', array( 27 'show_in_quick_edit' => true, 28 'hierarchical' => true, 29 ) 30 ); 27 31 28 $t1 = self::factory()->term->create( array( 29 'taxonomy' => 'wptests_tax_1', 30 ) ); 31 $t2 = self::factory()->term->create( array( 32 'taxonomy' => 'wptests_tax_2', 33 ) ); 32 $t1 = self::factory()->term->create( 33 array( 34 'taxonomy' => 'wptests_tax_1', 35 ) 36 ); 37 $t2 = self::factory()->term->create( 38 array( 39 'taxonomy' => 'wptests_tax_2', 40 ) 41 ); 34 42 35 43 // Become an administrator. 36 44 $this->_setRole( 'administrator' ); 37 45 38 $post = self::factory()->post->create_and_get( array( 39 'post_author' => get_current_user_id(), 40 ) ); 46 $post = self::factory()->post->create_and_get( 47 array( 48 'post_author' => get_current_user_id(), 49 ) 50 ); 41 51 42 52 // Set up a request. 43 53 $_POST['_inline_edit'] = wp_create_nonce( 'inlineeditnonce' ); 44 $_POST['post_ID'] = $post->ID;45 $_POST['post_type'] = $post->post_type;46 $_POST['content'] = $post->post_content;47 $_POST['excerpt'] = $post->post_excerpt;48 $_POST['_status'] = $post->post_status;49 $_POST['post_status'] = $post->post_status;50 $_POST['screen'] = 'post';51 $_POST['post_view'] = 'excerpt';52 $_POST['tax_input'] = array(54 $_POST['post_ID'] = $post->ID; 55 $_POST['post_type'] = $post->post_type; 56 $_POST['content'] = $post->post_content; 57 $_POST['excerpt'] = $post->post_excerpt; 58 $_POST['_status'] = $post->post_status; 59 $_POST['post_status'] = $post->post_status; 60 $_POST['screen'] = 'post'; 61 $_POST['post_view'] = 'excerpt'; 62 $_POST['tax_input'] = array( 53 63 'wptests_tax_1' => array( $t1 ), 54 64 'wptests_tax_2' => array( $t2 ),
Note: See TracChangeset
for help on using the changeset viewer.