Changeset 37641
- Timestamp:
- 06/06/2016 09:03:34 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/wpInsertTerm.php
r36214 r37641 644 644 645 645 /** 646 * @ticket 37009 647 */ 648 public function test_term_whose_slug_matches_existing_term_but_name_does_not_should_get_suffixed_slug() { 649 register_taxonomy( 'wptests_tax', 'post' ); 650 651 $t1 = self::factory()->term->create( array( 652 'name' => 'Foo#bar', 653 'taxonomy' => 'wptests_tax', 654 ) ); 655 656 $created = wp_insert_term( 'Foo$bar', 'wptests_tax' ); 657 658 $this->assertArrayHasKey( 'term_id', $created ); 659 660 $created_term = get_term( $created['term_id'] ); 661 $this->assertSame( 'Foo$bar', $created_term->name ); 662 $this->assertSame( 'foobar-2', $created_term->slug ); 663 } 664 665 /** 646 666 * @ticket 35321 647 667 */
Note: See TracChangeset
for help on using the changeset viewer.