Changeset 31346 for trunk/tests/phpunit/tests/query/taxQuery.php
- Timestamp:
- 02/06/2015 02:01:24 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/taxQuery.php
r31286 r31346 52 52 'taxonomy' => 'category', 53 53 'terms' => array( 'Foo' ), 54 'field' => 'name', 55 ), 56 ), 57 ) ); 58 59 $this->assertEquals( array( $p1 ), $q->posts ); 60 } 61 62 /** 63 * @ticket 27810 64 */ 65 public function test_field_name_should_work_for_names_with_spaces() { 66 register_taxonomy( 'wptests_tax', 'post' ); 67 68 $t = $this->factory->term->create( array( 69 'taxonomy' => 'wptests_tax', 70 'slug' => 'foo', 71 'name' => 'Foo Bar', 72 ) ); 73 $p1 = $this->factory->post->create(); 74 $p2 = $this->factory->post->create(); 75 76 wp_set_object_terms( $p1, $t, 'wptests_tax' ); 77 78 $q = new WP_Query( array( 79 'fields' => 'ids', 80 'tax_query' => array( 81 array( 82 'taxonomy' => 'wptests_tax', 83 'terms' => array( 'Foo Bar' ), 54 84 'field' => 'name', 55 85 ),
Note: See TracChangeset
for help on using the changeset viewer.