Changeset 27455 for trunk/tests/phpunit/tests/query.php
- Timestamp:
- 03/07/2014 06:32:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query.php
r27304 r27455 88 88 $this->assertTrue( $query->get( 'nonexistent', true ) ); 89 89 } 90 91 /** 92 * @ticket 25380 93 */ 94 function test_pre_posts_per_page() { 95 $this->factory->post->create_many( 10 ); 96 97 add_action( 'pre_get_posts', array( $this, 'filter_posts_per_page' ) ); 98 99 $this->go_to( get_feed_link() ); 100 101 $this->assertEquals( 30, get_query_var( 'posts_per_page' ) ); 102 } 103 104 function filter_posts_per_page( &$query ) { 105 $query->set( 'posts_per_page', 30 ); 106 } 90 107 }
Note: See TracChangeset
for help on using the changeset viewer.