Make WordPress Core

Ticket #39219: 39219-unit-tests-to-replace.diff

File 39219-unit-tests-to-replace.diff, 2.4 KB (added by peterwilsoncc, 8 years ago)
  • tests/phpunit/tests/theme.php

    diff --git tests/phpunit/tests/theme.php tests/phpunit/tests/theme.php
    index a9136d1..2e76f7c 100644
    class Tests_Theme extends WP_UnitTestCase { 
    302302
    303303                $theme = wp_get_theme();
    304304                $this->assertEquals( $style, (string) $theme );
    305                 $this->assertNotSame( false, $theme->errors() );
     305                $this->assertNotFalse( $theme->errors() );
    306306                $this->assertFalse( $theme->exists() );
    307307
    308308                // these return the bogus name - perhaps not ideal behaviour?
  • tests/phpunit/tests/theme/support.php

    diff --git tests/phpunit/tests/theme/support.php tests/phpunit/tests/theme/support.php
    index 648f031..9b7eb24 100644
    class Tests_Theme_Support extends WP_UnitTestCase { 
    9090                remove_theme_support( 'html5' );
    9191                $this->assertFalse( current_theme_supports( 'html5' ) );
    9292                $this->assertFalse( current_theme_supports( 'html5', 'comment-form' ) );
    93                 $this->assertNotSame( false, add_theme_support( 'html5' ) );
     93                $this->assertNotFalse( add_theme_support( 'html5' ) );
    9494                $this->assertTrue( current_theme_supports( 'html5' ) );
    9595                $this->assertTrue( current_theme_supports( 'html5', 'comment-form' ) );
    9696                $this->assertTrue( current_theme_supports( 'html5', 'comment-list' ) );
    class Tests_Theme_Support extends WP_UnitTestCase { 
    108108                $this->assertFalse( current_theme_supports( 'html5' ) );
    109109                $this->assertFalse( current_theme_supports( 'html5', 'comment-form' ) );
    110110                $this->assertFalse( add_theme_support( 'html5', 'comment-form' ) );
    111                 $this->assertNotSame( false, add_theme_support( 'html5', array( 'comment-form' ) ) );
     111                $this->assertNotFalse( add_theme_support( 'html5', array( 'comment-form' ) ) );
    112112                $this->assertTrue( current_theme_supports( 'html5', 'comment-form' ) );
    113113
    114114                // This will return true, which might help a plugin author decide what markup to serve,
    class Tests_Theme_Support extends WP_UnitTestCase { 
    117117
    118118                // It appends, rather than replaces.
    119119                $this->assertFalse( current_theme_supports( 'html5', 'comment-list' ) );
    120                 $this->assertNotSame( false, add_theme_support( 'html5', array( 'comment-list' ) ) );
     120                $this->assertNotFalse( add_theme_support( 'html5', array( 'comment-list' ) ) );
    121121                $this->assertTrue( current_theme_supports( 'html5', 'comment-form' ) );
    122122                $this->assertTrue( current_theme_supports( 'html5', 'comment-list' ) );
    123123                $this->assertFalse( current_theme_supports( 'html5', 'search-form' ) );