Changeset 42343 for trunk/tests/phpunit/tests/term/getEditTermLink.php
- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/getEditTermLink.php
r36986 r42343 12 12 13 13 public function test_get_edit_term_link_default() { 14 $term1 = self::factory()->term->create( array( 15 'taxonomy' => 'wptests_tax', 16 'name' => 'foo', 17 ) ); 14 $term1 = self::factory()->term->create( 15 array( 16 'taxonomy' => 'wptests_tax', 17 'name' => 'foo', 18 ) 19 ); 18 20 19 $actual = get_edit_term_link( $term1, 'wptests_tax' );21 $actual = get_edit_term_link( $term1, 'wptests_tax' ); 20 22 $expected = 'http://' . WP_TESTS_DOMAIN . '/wp-admin/term.php?taxonomy=wptests_tax&tag_ID=' . $term1 . '&post_type=post'; 21 23 $this->assertEquals( $expected, $actual ); … … 26 28 */ 27 29 public function test_get_edit_term_link_invalid_id() { 28 $term1 = self::factory()->term->create( array( 29 'taxonomy' => 'wptests_tax', 30 'name' => 'foo', 31 ) ); 30 $term1 = self::factory()->term->create( 31 array( 32 'taxonomy' => 'wptests_tax', 33 'name' => 'foo', 34 ) 35 ); 32 36 33 37 $actual = get_edit_term_link( 12345, 'wptests_tax' ); … … 55 59 */ 56 60 public function test_taxonomy_should_not_be_required() { 57 $t = self::factory()->term->create( array( 58 'taxonomy' => 'wptests_tax', 59 'name' => 'foo', 60 ) ); 61 $t = self::factory()->term->create( 62 array( 63 'taxonomy' => 'wptests_tax', 64 'name' => 'foo', 65 ) 66 ); 61 67 62 68 $actual = get_edit_term_link( $t ); … … 68 74 */ 69 75 public function test_cap_check_should_use_correct_taxonomy_when_taxonomy_is_not_specified() { 70 register_taxonomy( 'wptests_tax_subscriber', 'post', array( 71 'capabilities' => array( 72 'edit_terms' => 'read', 73 ), 74 ) ); 76 register_taxonomy( 77 'wptests_tax_subscriber', 'post', array( 78 'capabilities' => array( 79 'edit_terms' => 'read', 80 ), 81 ) 82 ); 75 83 76 $t = self::factory()->term->create( array( 77 'taxonomy' => 'wptests_tax_subscriber', 78 'name' => 'foo', 79 ) ); 84 $t = self::factory()->term->create( 85 array( 86 'taxonomy' => 'wptests_tax_subscriber', 87 'name' => 'foo', 88 ) 89 ); 80 90 81 $u = self::factory()->user->create( array( 82 'role' => 'subscriber', 83 ) ); 91 $u = self::factory()->user->create( 92 array( 93 'role' => 'subscriber', 94 ) 95 ); 84 96 wp_set_current_user( $u ); 85 97
Note: See TracChangeset
for help on using the changeset viewer.