Changeset 54242
- Timestamp:
- 09/20/2022 03:56:45 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/getPageByTitle.php
r54234 r54242 167 167 $found = get_page_by_title( 'foo', OBJECT, 'wptests_pt' ); 168 168 $this->assertSame( $p2, $found->ID, 'Should find a post with post type wptests_pt.' ); 169 $num_queries ++;169 ++$num_queries; 170 170 $this->assertSame( $num_queries, get_num_queries(), 'Should result in another database query.' ); 171 171 } … … 197 197 $found = get_page_by_title( 'bar' ); 198 198 $this->assertSame( $page, $found->ID, 'Should find a page with the new title.' ); 199 $num_queries++;199 ++$num_queries; 200 200 $this->assertSame( $num_queries, get_num_queries(), 'Should result in another database query.' ); 201 201 } … … 224 224 225 225 $array_n = get_page_by_title( 'foo', ARRAY_N ); 226 $num_queries++; // Add one database query for loading of post metadata.226 ++$num_queries; // Add one database query for loading of post metadata. 227 227 $this->assertIsArray( $array_n, 'Should be numbric array.' ); 228 228 $this->assertSame( $page, $array_n[0], 'Should match post id.' );
Note: See TracChangeset
for help on using the changeset viewer.