Changeset 36632 for trunk/tests/phpunit/tests/post/query.php
- Timestamp:
- 02/23/2016 04:39:50 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/query.php
r35242 r36632 305 305 306 306 /** 307 * @ticket 35692 308 */ 309 public function test_orderby_rand_with_seed() { 310 $q = new WP_Query( array( 311 'orderby' => 'RAND(5)', 312 ) ); 313 314 $this->assertContains( 'ORDER BY RAND(5)', $q->request ); 315 } 316 317 /** 318 * @ticket 35692 319 */ 320 public function test_orderby_rand_should_ignore_invalid_seed() { 321 $q = new WP_Query( array( 322 'orderby' => 'RAND(foo)', 323 ) ); 324 325 $this->assertNotContains( 'ORDER BY RAND', $q->request ); 326 } 327 328 /** 329 * @ticket 35692 330 */ 331 public function test_orderby_rand_with_seed_should_be_case_insensitive() { 332 $q = new WP_Query( array( 333 'orderby' => 'rand(5)', 334 ) ); 335 336 $this->assertContains( 'ORDER BY RAND(5)', $q->request ); 337 } 338 339 /** 307 340 * Tests the post_name__in attribute of WP_Query. 308 341 *
Note: See TracChangeset
for help on using the changeset viewer.