Changeset 43571 for trunk/tests/phpunit/tests/term/query.php
- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/query.php
r43313 r43571 332 332 333 333 $query = new WP_Term_Query(); 334 $args = array(334 $args = array( 335 335 'taxonomy' => 'wptests_tax_1', 336 336 'object_ids' => $posts, … … 463 463 public function test_get_the_terms_should_respect_taxonomy_orderby() { 464 464 register_taxonomy( 465 'wptests_tax', 'post', array( 465 'wptests_tax', 466 'post', 467 array( 466 468 'sort' => true, 467 469 'args' => array( … … 471 473 ); 472 474 $term_ids = self::factory()->term->create_many( 473 2, array( 475 2, 476 array( 474 477 'taxonomy' => 'wptests_tax', 475 478 ) … … 490 493 public function test_wp_get_object_terms_should_respect_taxonomy_orderby() { 491 494 register_taxonomy( 492 'wptests_tax', 'post', array( 495 'wptests_tax', 496 'post', 497 array( 493 498 'sort' => true, 494 499 'args' => array( … … 498 503 ); 499 504 $term_ids = self::factory()->term->create_many( 500 2, array( 505 2, 506 array( 501 507 'taxonomy' => 'wptests_tax', 502 508 ) … … 542 548 543 549 $expected = wp_get_post_terms( 544 $p, 'wptests_tax', array( 550 $p, 551 'wptests_tax', 552 array( 545 553 'fields' => 'ids', 546 554 ) … … 549 557 $found1 = array_keys( 550 558 wp_get_object_terms( 551 $p, 'wptests_tax', array( 559 $p, 560 'wptests_tax', 561 array( 552 562 'fields' => 'id=>parent', 553 563 ) … … 557 567 $found2 = array_keys( 558 568 wp_get_object_terms( 559 $p, 'wptests_tax', array( 569 $p, 570 'wptests_tax', 571 array( 560 572 'fields' => 'id=>slug', 561 573 ) … … 565 577 $found3 = array_keys( 566 578 wp_get_object_terms( 567 $p, 'wptests_tax', array( 579 $p, 580 'wptests_tax', 581 array( 568 582 'fields' => 'id=>name', 569 583 ) … … 657 671 register_taxonomy( 'wptests_tax', 'post' ); 658 672 659 $terms = self::factory()->term->create_many( 3, array( 660 'taxonomy' => 'wptests_tax', 661 ) ); 673 $terms = self::factory()->term->create_many( 674 3, 675 array( 676 'taxonomy' => 'wptests_tax', 677 ) 678 ); 662 679 663 680 $this->term_id = $terms[1]; 664 681 665 682 add_filter( 'get_term', array( $this, 'filter_term_to_null' ) ); 666 $found = get_terms( array( 667 'taxonomy' => 'wptests_tax', 668 'hide_empty' => false, 669 ) ); 683 $found = get_terms( 684 array( 685 'taxonomy' => 'wptests_tax', 686 'hide_empty' => false, 687 ) 688 ); 670 689 remove_filter( 'get_term', array( $this, 'filter_term_to_null' ) ); 671 690 … … 689 708 register_taxonomy( 'wptests_tax', 'post' ); 690 709 691 $terms = self::factory()->term->create_many( 3, array( 692 'taxonomy' => 'wptests_tax', 693 ) ); 710 $terms = self::factory()->term->create_many( 711 3, 712 array( 713 'taxonomy' => 'wptests_tax', 714 ) 715 ); 694 716 695 717 $this->term_id = $terms[1]; 696 718 697 719 add_filter( 'get_term', array( $this, 'filter_term_to_wp_error' ) ); 698 $found = get_terms( array( 699 'taxonomy' => 'wptests_tax', 700 'hide_empty' => false, 701 ) ); 720 $found = get_terms( 721 array( 722 'taxonomy' => 'wptests_tax', 723 'hide_empty' => false, 724 ) 725 ); 702 726 remove_filter( 'get_term', array( $this, 'filter_term_to_wp_error' ) ); 703 727
Note: See TracChangeset
for help on using the changeset viewer.