Changeset 40388
- Timestamp:
- 04/06/2017 06:19:02 PM (7 years ago)
- Location:
- branches/4.7
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/tests/phpunit/includes/testcase.php
r40250 r40388 459 459 ksort( $actual ); 460 460 $this->assertEquals( $expected, $actual ); 461 } 462 463 /** 464 * Asserts that a condition is not false. 465 * 466 * @param bool $condition 467 * @param string $message 468 * 469 * @throws PHPUnit_Framework_AssertionFailedError 470 */ 471 public static function assertNotFalse( $condition, $message = '' ) { 472 self::assertThat( $condition, self::logicalNot( self::isFalse() ), $message ); 461 473 } 462 474 -
branches/4.7/tests/phpunit/tests/customize/custom-css-setting.php
r39694 r40388 151 151 $saved = $this->setting->save(); 152 152 153 $this->assert True( false !==$saved );153 $this->assertNotFalse( $saved ); 154 154 $this->assertEquals( $updated_css, $this->setting->value() ); 155 155 $this->assertEquals( $updated_css, wp_get_custom_css( $this->setting->stylesheet ) ); -
branches/4.7/tests/phpunit/tests/customize/setting.php
r40088 r40388 466 466 // Satisfy all requirements for save to happen. 467 467 wp_set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) ); 468 $this->assert True( false !==$setting->save() );468 $this->assertNotFalse( $setting->save() ); 469 469 $this->assertTrue( 1 === did_action( 'customize_update_custom' ) ); 470 470 $this->assertTrue( 1 === did_action( 'customize_save_foo' ) ); -
branches/4.7/tests/phpunit/tests/media.php
r40071 r40388 1259 1259 // Test to confirm all sources in the array include the same edit hash. 1260 1260 foreach ( $sizes as $size ) { 1261 $this->assert True( false !==strpos( $size, $hash ) );1261 $this->assertNotFalse( strpos( $size, $hash ) ); 1262 1262 } 1263 1263 } -
branches/4.7/tests/phpunit/tests/oembed/template.php
r36873 r40388 26 26 $doc = new DOMDocument(); 27 27 $this->assertTrue( $doc->loadHTML( $actual ) ); 28 $this->assert True( false ===strpos( $actual, 'That embed can’t be found.' ) );29 $this->assert True( false !==strpos( $actual, 'Hello World' ) );28 $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) ); 29 $this->assertNotFalse( strpos( $actual, 'Hello World' ) ); 30 30 } 31 31 … … 53 53 $this->assertTrue( $doc->loadHTML( $actual ) ); 54 54 $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) ); 55 $this->assert True( false !==strpos( $actual, 'Hello World' ) );56 $this->assert True( false !==strpos( $actual, 'canola.jpg' ) );55 $this->assertNotFalse( strpos( $actual, 'Hello World' ) ); 56 $this->assertNotFalse( strpos( $actual, 'canola.jpg' ) ); 57 57 } 58 58 … … 69 69 $doc = new DOMDocument(); 70 70 $this->assertTrue( $doc->loadHTML( $actual ) ); 71 $this->assert True( false !==strpos( $actual, 'That embed can’t be found.' ) );71 $this->assertNotFalse( strpos( $actual, 'That embed can’t be found.' ) ); 72 72 } 73 73 … … 93 93 $this->assertTrue( $doc->loadHTML( $actual ) ); 94 94 $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) ); 95 $this->assert True( false !==strpos( $actual, 'Hello World' ) );96 $this->assert True( false !==strpos( $actual, 'canola.jpg' ) );95 $this->assertNotFalse( strpos( $actual, 'Hello World' ) ); 96 $this->assertNotFalse( strpos( $actual, 'canola.jpg' ) ); 97 97 } 98 98 … … 115 115 $doc = new DOMDocument(); 116 116 $this->assertTrue( $doc->loadHTML( $actual ) ); 117 $this->assert True( false !==strpos( $actual, 'That embed can’t be found.' ) );117 $this->assertNotFalse( strpos( $actual, 'That embed can’t be found.' ) ); 118 118 } 119 119 … … 137 137 $doc = new DOMDocument(); 138 138 $this->assertTrue( $doc->loadHTML( $actual ) ); 139 $this->assert True( false !==strpos( $actual, 'That embed can’t be found.' ) );139 $this->assertNotFalse( strpos( $actual, 'That embed can’t be found.' ) ); 140 140 } 141 141 … … 158 158 $doc = new DOMDocument(); 159 159 $this->assertTrue( $doc->loadHTML( $actual ) ); 160 $this->assert True( false !==strpos( $actual, 'That embed can’t be found.' ) );160 $this->assertNotFalse( strpos( $actual, 'That embed can’t be found.' ) ); 161 161 } 162 162 … … 183 183 $doc = new DOMDocument(); 184 184 $this->assertTrue( $doc->loadHTML( $actual ) ); 185 $this->assert True( false ===strpos( $actual, 'That embed can’t be found.' ) );186 $this->assert True( false !==strpos( $actual, 'Hello World' ) );185 $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) ); 186 $this->assertNotFalse( strpos( $actual, 'Hello World' ) ); 187 187 } 188 188 -
branches/4.7/tests/phpunit/tests/oembed/wpOembed.php
r37729 r40388 37 37 remove_filter( 'pre_oembed_result', array( $this, '_filter_pre_oembed_result' ) ); 38 38 39 $this->assert True( false !==$this->pre_oembed_result_filtered );39 $this->assertNotFalse( $this->pre_oembed_result_filtered ); 40 40 $this->assertEquals( $this->pre_oembed_result_filtered, $actual ); 41 41 } … … 52 52 remove_filter( 'pre_oembed_result', array( $this, '_filter_pre_oembed_result' ) ); 53 53 54 $this->assert True( false !==$this->pre_oembed_result_filtered );54 $this->assertNotFalse( $this->pre_oembed_result_filtered ); 55 55 $this->assertEquals( $this->pre_oembed_result_filtered, $actual ); 56 56 } … … 67 67 remove_filter( 'pre_oembed_result', array( $this, '_filter_pre_oembed_result' ) ); 68 68 69 $this->assert True( false !==$this->pre_oembed_result_filtered );69 $this->assertNotFalse( $this->pre_oembed_result_filtered ); 70 70 $this->assertFalse( $actual ); 71 71 } -
branches/4.7/tests/phpunit/tests/post/thumbnails.php
r38938 r40388 195 195 set_post_thumbnail( self::$post, self::$attachment_id ); 196 196 197 $this->assert True( false !==get_the_post_thumbnail_url( self::$post->ID ) );197 $this->assertNotFalse( get_the_post_thumbnail_url( self::$post->ID ) ); 198 198 199 199 $deleted = wp_delete_post( self::$post->ID, true ); -
branches/4.7/tests/phpunit/tests/post/wpPostType.php
r38938 r40388 102 102 $rewrite_tags_after = $wp_rewrite->rewritecode; 103 103 104 $this->assert True( false !==array_search( "%$post_type%", $rewrite_tags ) );104 $this->assertNotFalse( array_search( "%$post_type%", $rewrite_tags ) ); 105 105 $this->assertFalse( array_search( "%$post_type%", $rewrite_tags_after ) ); 106 106 } -
branches/4.7/tests/phpunit/tests/term/wpTaxonomy.php
r38747 r40388 67 67 $rewrite_tags_after = $wp_rewrite->rewritecode; 68 68 69 $this->assert True( false !==array_search( "%$taxonomy%", $rewrite_tags ) );69 $this->assertNotFalse( array_search( "%$taxonomy%", $rewrite_tags ) ); 70 70 $this->assertFalse( array_search( "%$taxonomy%", $rewrite_tags_after ) ); 71 71 } -
branches/4.7/tests/phpunit/tests/theme.php
r39173 r40388 303 303 $theme = wp_get_theme(); 304 304 $this->assertEquals( $style, (string) $theme ); 305 $this->assertNot Same( false,$theme->errors() );305 $this->assertNotFalse( $theme->errors() ); 306 306 $this->assertFalse( $theme->exists() ); 307 307 -
branches/4.7/tests/phpunit/tests/theme/support.php
r37313 r40388 91 91 $this->assertFalse( current_theme_supports( 'html5' ) ); 92 92 $this->assertFalse( current_theme_supports( 'html5', 'comment-form' ) ); 93 $this->assertNot Same( false,add_theme_support( 'html5' ) );93 $this->assertNotFalse( add_theme_support( 'html5' ) ); 94 94 $this->assertTrue( current_theme_supports( 'html5' ) ); 95 95 $this->assertTrue( current_theme_supports( 'html5', 'comment-form' ) ); … … 109 109 $this->assertFalse( current_theme_supports( 'html5', 'comment-form' ) ); 110 110 $this->assertFalse( add_theme_support( 'html5', 'comment-form' ) ); 111 $this->assertNot Same( false,add_theme_support( 'html5', array( 'comment-form' ) ) );111 $this->assertNotFalse( add_theme_support( 'html5', array( 'comment-form' ) ) ); 112 112 $this->assertTrue( current_theme_supports( 'html5', 'comment-form' ) ); 113 113 … … 118 118 // It appends, rather than replaces. 119 119 $this->assertFalse( current_theme_supports( 'html5', 'comment-list' ) ); 120 $this->assertNot Same( false,add_theme_support( 'html5', array( 'comment-list' ) ) );120 $this->assertNotFalse( add_theme_support( 'html5', array( 'comment-list' ) ) ); 121 121 $this->assertTrue( current_theme_supports( 'html5', 'comment-form' ) ); 122 122 $this->assertTrue( current_theme_supports( 'html5', 'comment-list' ) );
Note: See TracChangeset
for help on using the changeset viewer.