Build/Test Tools: Add support for is_front_page() to assertQueryTrue() and assert that all the tested conditions are supported by the method.

Fixes #37849


git-svn-id: https://develop.svn.wordpress.org/trunk@38405 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2016-08-27 15:27:35 +00:00
parent 7b275f6a07
commit 417de45c08
2 changed files with 7 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ class Tests_Query_Conditionals extends WP_UnitTestCase {
function test_home() {
$this->go_to('/');
$this->assertQueryTrue('is_home');
$this->assertQueryTrue( 'is_home', 'is_front_page' );
}
function test_404() {
@@ -255,7 +255,7 @@ class Tests_Query_Conditionals extends WP_UnitTestCase {
self::factory()->post->create_many( 5 );
for ( $i = 2; $i <= 3; $i++ ) {
$this->go_to("/page/{$i}/");
$this->assertQueryTrue('is_home', 'is_paged');
$this->assertQueryTrue( 'is_home', 'is_front_page', 'is_paged' );
}
}