Changeset 25239 for trunk/tests/phpunit/tests/query/results.php
- Timestamp:
- 09/04/2013 06:50:04 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/results.php
r25002 r25239 370 370 ), wp_list_pluck( $posts, 'post_title' ) ); 371 371 } 372 373 function test_exlude_from_search_empty() { 374 global $wp_post_types; 375 foreach ( array_keys( $wp_post_types ) as $slug ) 376 $wp_post_types[$slug]->exclude_from_search = true; 377 378 $posts = $this->q->query( array( 'post_type' => 'any' ) ); 379 380 $this->assertEmpty( $posts ); 381 $this->assertRegExp( '#AND 1=0#', $this->q->request ); 382 383 foreach ( array_keys( $wp_post_types ) as $slug ) 384 $wp_post_types[$slug]->exclude_from_search = false; 385 386 $posts2 = $this->q->query( array( 'post_type' => 'any' ) ); 387 388 $this->assertNotEmpty( $posts2 ); 389 $this->assertNotRegExp( '#AND 1=0#', $this->q->request ); 390 } 372 391 }
Note: See TracChangeset
for help on using the changeset viewer.