Changeset 37360 for trunk/tests/phpunit/tests/user/query.php
- Timestamp:
- 05/04/2016 06:56:58 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/user/query.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/query.php
r37359 r37360 694 694 ) 695 695 ), 696 ) ); 697 698 $found = wp_list_pluck( $q->get_results(), 'ID' ); 699 700 $this->assertNotContains( self::$author_ids[0], $found ); 701 $this->assertContains( self::$author_ids[1], $found ); 702 $this->assertNotContains( self::$author_ids[2], $found ); 703 } 704 705 /** 706 * @ticket 36724 707 */ 708 public function test_who_authors_should_work_alongside_meta_params() { 709 if ( ! is_multisite() ) { 710 $this->markTestSkipped( __METHOD__ . ' requires multisite.' ); 711 } 712 713 $b = self::factory()->blog->create(); 714 715 add_user_to_blog( $b, self::$author_ids[0], 'subscriber' ); 716 add_user_to_blog( $b, self::$author_ids[1], 'author' ); 717 add_user_to_blog( $b, self::$author_ids[2], 'editor' ); 718 719 add_user_meta( self::$author_ids[1], 'foo', 'bar' ); 720 add_user_meta( self::$author_ids[2], 'foo', 'baz' ); 721 722 $q = new WP_User_Query( array( 723 'who' => 'authors', 724 'blog_id' => $b, 725 'meta_key' => 'foo', 726 'meta_value' => 'bar', 696 727 ) ); 697 728
Note: See TracChangeset
for help on using the changeset viewer.