Changeset 38382 for trunk/tests/phpunit/tests/query/results.php
- Timestamp:
- 08/26/2016 08:21:30 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/query/results.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/results.php
r36138 r38382 457 457 */ 458 458 function test_query_author_vars() { 459 $author_1 = self::factory()->user->create( array( 'user_login' => 'a dmin1', 'user_pass' => rand_str(), 'role' => 'author' ) );460 $post_1 = self::factory()->post->create( array( 'post_title' => rand_str(), 'post_author' => $author_1, 'post_date' => '2007-01-01 00:00:00' ) );461 462 $author_2 = self::factory()->user->create( array( 'user_login' => rand_str(), 'user_pass' => rand_str(), 'role' => 'author' ) );463 $post_2 = self::factory()->post->create( array( 'post_title' => rand_str(), 'post_author' => $author_2, 'post_date' => '2007-01-01 00:00:00' ) );464 465 $author_3 = self::factory()->user->create( array( 'user_login' => rand_str(), 'user_pass' => rand_str(), 'role' => 'author' ) );466 $post_3 = self::factory()->post->create( array( 'post_title' => rand_str(), 'post_author' => $author_3, 'post_date' => '2007-01-01 00:00:00' ) );467 468 $author_4 = self::factory()->user->create( array( 'user_login' => rand_str(), 'user_pass' => rand_str(), 'role' => 'author' ) );469 $post_4 = self::factory()->post->create( array( 'post_title' => rand_str(), 'post_author' => $author_4, 'post_date' => '2007-01-01 00:00:00' ) );459 $author_1 = self::factory()->user->create( array( 'user_login' => 'author1', 'role' => 'author' ) ); 460 $post_1 = self::factory()->post->create( array( 'post_title' => 'Post 1', 'post_author' => $author_1, 'post_date' => '2007-01-01 00:00:00' ) ); 461 462 $author_2 = self::factory()->user->create( array( 'user_login' => 'author2', 'role' => 'author' ) ); 463 $post_2 = self::factory()->post->create( array( 'post_title' => 'Post 2', 'post_author' => $author_2, 'post_date' => '2007-01-01 00:00:00' ) ); 464 465 $author_3 = self::factory()->user->create( array( 'user_login' => 'author3', 'role' => 'author' ) ); 466 $post_3 = self::factory()->post->create( array( 'post_title' => 'Post 3', 'post_author' => $author_3, 'post_date' => '2007-01-01 00:00:00' ) ); 467 468 $author_4 = self::factory()->user->create( array( 'user_login' => 'author4', 'role' => 'author' ) ); 469 $post_4 = self::factory()->post->create( array( 'post_title' => 'Post 4', 'post_author' => $author_4, 'post_date' => '2007-01-01 00:00:00' ) ); 470 470 471 471 $posts = $this->q->query( array( … … 550 550 551 551 $posts = $this->q->query( array( 552 'author_name' => 'a dmin1',552 'author_name' => 'author1', 553 553 'post__in' => array( $post_1, $post_2, $post_3, $post_4 ) 554 554 ) );
Note: See TracChangeset
for help on using the changeset viewer.