Changeset 43571 for trunk/tests/phpunit/tests/term/wpInsertTerm.php
- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/wpInsertTerm.php
r42343 r43571 79 79 public function test_wp_insert_term_parent_does_not_exist() { 80 80 $found = wp_insert_term( 81 'foo', 'post_tag', array( 81 'foo', 82 'post_tag', 83 array( 82 84 'parent' => 999999, 83 85 ) … … 101 103 register_taxonomy( 'wptests_tax', 'post' ); 102 104 $found = wp_insert_term( 103 'Quality', 'wptests_tax', array( 105 'Quality', 106 'wptests_tax', 107 array( 104 108 'description' => 'Let\\\'s all say \\"Hooray\\" for WordPress taxonomy', 105 109 ) … … 115 119 register_taxonomy( 'wptests_tax', 'post' ); 116 120 $found = wp_insert_term( 117 'Quality', 'wptests_tax', array( 121 'Quality', 122 'wptests_tax', 123 array( 118 124 'parent' => 'foo1', 119 125 ) … … 130 136 register_taxonomy( 'wptests_tax', 'post' ); 131 137 $found = wp_insert_term( 132 'Quality', 'wptests_tax', array( 138 'Quality', 139 'wptests_tax', 140 array( 133 141 'slug' => '', 134 142 ) … … 145 153 register_taxonomy( 'wptests_tax', 'post' ); 146 154 $found = wp_insert_term( 147 'Quality', 'wptests_tax', array( 155 'Quality', 156 'wptests_tax', 157 array( 148 158 'slug' => ' ', 149 159 ) … … 159 169 register_taxonomy( 'wptests_tax', 'post' ); 160 170 $found = wp_insert_term( 161 'Quality', 'wptests_tax', array( 171 'Quality', 172 'wptests_tax', 173 array( 162 174 'slug' => 0, 163 175 ) … … 260 272 261 273 $t2 = wp_insert_term( 262 'Foo', 'wptests_tax', array( 274 'Foo', 275 'wptests_tax', 276 array( 263 277 'slug' => 'foo', 264 278 ) … … 291 305 292 306 $t3 = wp_insert_term( 293 'Foo', 'wptests_tax', array( 307 'Foo', 308 'wptests_tax', 309 array( 294 310 'slug' => 'bar', 295 311 ) … … 314 330 315 331 $t2 = wp_insert_term( 316 'Foo', 'wptests_tax', array( 332 'Foo', 333 'wptests_tax', 334 array( 317 335 'slug' => 'foo-unique', 318 336 ) … … 359 377 360 378 $t2 = wp_insert_term( 361 'Foo', 'wptests_tax', array( 379 'Foo', 380 'wptests_tax', 381 array( 362 382 'slug' => 'foo', 363 383 ) … … 390 410 391 411 $t3 = wp_insert_term( 392 'Foo', 'wptests_tax', array( 412 'Foo', 413 'wptests_tax', 414 array( 393 415 'slug' => 'bar', 394 416 ) … … 424 446 425 447 $t4 = wp_insert_term( 426 'Foo', 'wptests_tax', array( 448 'Foo', 449 'wptests_tax', 450 array( 427 451 'slug' => 'bar', 428 452 ) … … 479 503 480 504 $t1_child = wp_insert_term( 481 'Child', 'wptests_tax', array( 505 'Child', 506 'wptests_tax', 507 array( 482 508 'parent' => $t1, 483 509 ) … … 485 511 486 512 $t2_child = wp_insert_term( 487 'Child', 'wptests_tax', array( 513 'Child', 514 'wptests_tax', 515 array( 488 516 'parent' => $t2, 489 517 ) … … 491 519 492 520 $error = wp_insert_term( 493 'Child', 'wptests_tax', array( 521 'Child', 522 'wptests_tax', 523 array( 494 524 'parent' => $t2, 495 525 ) … … 515 545 516 546 $t2 = wp_insert_term( 517 'Foo', 'wptests_tax', array( 547 'Foo', 548 'wptests_tax', 549 array( 518 550 'slug' => 'foo-unique', 519 551 ) … … 561 593 562 594 $created = wp_insert_term( 563 'Foo 2', 'wptests_tax', array( 595 'Foo 2', 596 'wptests_tax', 597 array( 564 598 'slug' => 'foo', 565 599 ) … … 589 623 590 624 $created = wp_insert_term( 591 'Foo 2', 'wptests_tax_2', array( 625 'Foo 2', 626 'wptests_tax_2', 627 array( 592 628 'slug' => 'foo', 593 629 ) … … 623 659 624 660 $created = wp_insert_term( 625 'Foo 2', 'wptests_tax_2', array( 661 'Foo 2', 662 'wptests_tax_2', 663 array( 626 664 'slug' => 'foo', 627 665 ) … … 652 690 653 691 $created_term_ids = wp_insert_term( 654 'Foo', 'wptests_tax', array( 692 'Foo', 693 'wptests_tax', 694 array( 655 695 'alias_of' => $term_1->slug, 656 696 ) … … 686 726 687 727 $created_term_ids = wp_insert_term( 688 'Foo', 'wptests_tax', array( 728 'Foo', 729 'wptests_tax', 730 array( 689 731 'alias_of' => $term_2->slug, 690 732 ) … … 700 742 register_taxonomy( 'wptests_tax', 'post' ); 701 743 $created_term_ids = wp_insert_term( 702 'Foo', 'wptests_tax', array( 744 'Foo', 745 'wptests_tax', 746 array( 703 747 'alias_of' => 'foo', 704 748 ) … … 743 787 public function test_wp_insert_term_should_clean_term_cache() { 744 788 register_taxonomy( 745 'wptests_tax', 'post', array( 789 'wptests_tax', 790 'post', 791 array( 746 792 'hierarchical' => true, 747 793 ) … … 764 810 765 811 $found = wp_insert_term( 766 'foo', 'wptests_tax', array( 812 'foo', 813 'wptests_tax', 814 array( 767 815 'parent' => $t, 768 816 ) … … 837 885 838 886 $term = wp_insert_term( 839 'foo', 'wptests_tax', array( 887 'foo', 888 'wptests_tax', 889 array( 840 890 'description' => null, 841 891 )
Note: See TracChangeset
for help on using the changeset viewer.