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

@@ -577,6 +577,7 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
'is_day',
'is_embed',
'is_feed',
'is_front_page',
'is_home',
'is_month',
'is_page',
@@ -596,6 +597,10 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
);
$true = func_get_args();
foreach ( $true as $true_thing ) {
$this->assertContains( $true_thing, $all, "{$true_thing}() is not handled by assertQueryTrue()." );
}
$passed = true;
$not_false = $not_true = array(); // properties that were not set to expected values