Changeset 58235
- Timestamp:
- 05/29/2024 12:20:56 PM (4 months ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/block-template-utils.php
r57919 r58235 380 380 $filename = wp_generate_block_templates_export_file(); 381 381 $this->assertFileExists( $filename, 'zip file is created at the specified path' ); 382 $this->assert True( filesize( $filename ) > 0, 'zip file is larger than 0 bytes' );382 $this->assertGreaterThan( 0, filesize( $filename ), 'zip file is larger than 0 bytes' ); 383 383 384 384 // Open ZIP file and make sure the directories exist. -
trunk/tests/phpunit/tests/formatting/utf8UriEncode.php
r56536 r58235 23 23 public function test_output_is_not_longer_than_optional_length_argument( $utf8, $unused_for_this_test ) { 24 24 $max_length = 30; 25 $this->assert True( strlen( utf8_uri_encode( $utf8, $max_length ) ) <= $max_length);25 $this->assertLessThanOrEqual( $max_length, strlen( utf8_uri_encode( $utf8, $max_length ) ) ); 26 26 } 27 27 -
trunk/tests/phpunit/tests/l10n/wpTranslationsConvert.php
r57513 r58235 502 502 $this->assertNull( $destination->error() ); 503 503 504 $this->assert True( filesize( $destination_file ) > 0);504 $this->assertGreaterThan( 0, filesize( $destination_file ) ); 505 505 506 506 $destination_read = WP_Translation_File::create( $destination_file, $destination_format ); -
trunk/tests/phpunit/tests/multisite/site.php
r58097 r58235 1214 1214 $this->assertEquals( $expected_data[ $key ], $value ); 1215 1215 } elseif ( 'last_updated' === $key ) { 1216 $this->assert True( $old_site->last_updated <= $value);1216 $this->assertLessThanOrEqual( $value, $old_site->last_updated ); 1217 1217 } else { 1218 1218 $this->assertSame( $old_site->$key, $value ); -
trunk/tests/phpunit/tests/oembed/controller.php
r58044 r58235 343 343 $this->assertSame( $post->post_title, $data['title'] ); 344 344 $this->assertSame( 'rich', $data['type'] ); 345 $this->assert True( $data['width'] <= $request['maxwidth'] );345 $this->assertLessThanOrEqual( $request['maxwidth'], $data['width'] ); 346 346 } 347 347 … … 386 386 $this->assertSame( $post->post_title, $data['title'] ); 387 387 $this->assertSame( 'rich', $data['type'] ); 388 $this->assert True( $data['width'] <= $request['maxwidth'] );388 $this->assertLessThanOrEqual( $request['maxwidth'], $data['width'] ); 389 389 390 390 update_option( 'show_on_front', 'posts' ); … … 431 431 $this->assertSame( $post->post_title, $data['title'] ); 432 432 $this->assertSame( 'rich', $data['type'] ); 433 $this->assert True( $data['width'] <= $request['maxwidth'] );433 $this->assertLessThanOrEqual( $request['maxwidth'], $data['width'] ); 434 434 } 435 435 … … 717 717 $this->assertSame( $post->post_title, $data['title'] ); 718 718 $this->assertSame( 'rich', $data['type'] ); 719 $this->assert True( $data['width'] <= $request['maxwidth'] );719 $this->assertLessThanOrEqual( $request['maxwidth'], $data['width'] ); 720 720 } 721 721 … … 766 766 $this->assertSame( $post->post_title, $data['title'] ); 767 767 $this->assertSame( 'rich', $data['type'] ); 768 $this->assert True( $data['width'] <= $request['maxwidth'] );768 $this->assertLessThanOrEqual( $request['maxwidth'], $data['width'] ); 769 769 770 770 update_option( 'show_on_front', 'posts' ); -
trunk/tests/phpunit/tests/oembed/getResponseData.php
r52132 r58235 249 249 $this->assertArrayHasKey( 'thumbnail_width', $data ); 250 250 $this->assertArrayHasKey( 'thumbnail_height', $data ); 251 $this->assert True( 400 >=$data['thumbnail_width'] );251 $this->assertLessThanOrEqual( 400, $data['thumbnail_width'] ); 252 252 } 253 253 … … 268 268 $this->assertArrayHasKey( 'thumbnail_width', $data ); 269 269 $this->assertArrayHasKey( 'thumbnail_height', $data ); 270 $this->assert True( 400 >=$data['thumbnail_width'] );270 $this->assertLessThanOrEqual( 400, $data['thumbnail_width'] ); 271 271 } 272 272 }
Note: See TracChangeset
for help on using the changeset viewer.