mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Build/Test Tools: Add assertNotFalse() method to WP_UnitTestCase and use it where appropriate.
Props peterwilsoncc. Fixes #39219. git-svn-id: https://develop.svn.wordpress.org/trunk@39919 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -90,7 +90,7 @@ class Tests_Theme_Support extends WP_UnitTestCase {
|
||||
remove_theme_support( 'html5' );
|
||||
$this->assertFalse( current_theme_supports( 'html5' ) );
|
||||
$this->assertFalse( current_theme_supports( 'html5', 'comment-form' ) );
|
||||
$this->assertNotSame( false, add_theme_support( 'html5' ) );
|
||||
$this->assertNotFalse( add_theme_support( 'html5' ) );
|
||||
$this->assertTrue( current_theme_supports( 'html5' ) );
|
||||
$this->assertTrue( current_theme_supports( 'html5', 'comment-form' ) );
|
||||
$this->assertTrue( current_theme_supports( 'html5', 'comment-list' ) );
|
||||
@@ -108,7 +108,7 @@ class Tests_Theme_Support extends WP_UnitTestCase {
|
||||
$this->assertFalse( current_theme_supports( 'html5' ) );
|
||||
$this->assertFalse( current_theme_supports( 'html5', 'comment-form' ) );
|
||||
$this->assertFalse( add_theme_support( 'html5', 'comment-form' ) );
|
||||
$this->assertNotSame( false, add_theme_support( 'html5', array( 'comment-form' ) ) );
|
||||
$this->assertNotFalse( add_theme_support( 'html5', array( 'comment-form' ) ) );
|
||||
$this->assertTrue( current_theme_supports( 'html5', 'comment-form' ) );
|
||||
|
||||
// This will return true, which might help a plugin author decide what markup to serve,
|
||||
@@ -117,7 +117,7 @@ class Tests_Theme_Support extends WP_UnitTestCase {
|
||||
|
||||
// It appends, rather than replaces.
|
||||
$this->assertFalse( current_theme_supports( 'html5', 'comment-list' ) );
|
||||
$this->assertNotSame( false, add_theme_support( 'html5', array( 'comment-list' ) ) );
|
||||
$this->assertNotFalse( add_theme_support( 'html5', array( 'comment-list' ) ) );
|
||||
$this->assertTrue( current_theme_supports( 'html5', 'comment-form' ) );
|
||||
$this->assertTrue( current_theme_supports( 'html5', 'comment-list' ) );
|
||||
$this->assertFalse( current_theme_supports( 'html5', 'search-form' ) );
|
||||
|
||||
Reference in New Issue
Block a user