Changeset 33706 for trunk/tests/phpunit/tests/query/results.php
- Timestamp:
- 08/22/2015 04:58:21 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/results.php
r31324 r33706 704 704 } 705 705 706 function test_title() { 707 $title = 'Tacos are Cool'; 708 $post_id = $this->factory->post->create( array( 709 'post_title' => $title, 710 'post_type' => 'post', 711 'post_status' => 'publish' 712 ) ); 713 714 $result1 = $this->q->query( array( 'title' => $title, 'fields' => 'ids' ) ); 715 $this->assertCount( 1, $result1 ); 716 $this->assertContains( $post_id, $result1 ); 717 718 $result2 = $this->q->query( array( 'title' => 'Tacos', 'fields' => 'ids' ) ); 719 $this->assertCount( 0, $result2 ); 720 } 706 721 }
Note: See TracChangeset
for help on using the changeset viewer.