Changeset 49025
- Timestamp:
- 09/21/2020 01:25:38 PM (4 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ajax/Compression.php
r48997 r49025 55 55 /** 56 56 * Fetch the test text (gzdeflate) 57 * 58 * @requires function gzdeflate 57 59 */ 58 60 public function test_gzdeflate() { 59 60 if ( ! function_exists( 'gzdeflate' ) ) {61 $this->fail( 'gzdeflate function not available' );62 }63 61 64 62 // Become an administrator. … … 82 80 /** 83 81 * Fetch the test text (gzencode) 82 * 83 * @requires function gzencode 84 84 */ 85 85 public function test_gzencode() { 86 87 if ( ! function_exists( 'gzencode' ) ) {88 $this->fail( 'gzencode function not available' );89 }90 86 91 87 // Become an administrator. -
trunk/tests/phpunit/tests/ajax/Response.php
r47122 r49025 71 71 * @preserveGlobalState disabled 72 72 * @group xdebug 73 * @requires function xdebug_get_headers 73 74 */ 74 75 public function test_response_charset_in_header() { 75 76 if ( ! function_exists( 'xdebug_get_headers' ) ) {77 $this->markTestSkipped( 'xdebug is required for this test' );78 }79 76 80 77 // Generate an Ajax response. -
trunk/tests/phpunit/tests/functions.php
r48937 r49025 943 943 /** 944 944 * @ticket 28786 945 * @requires function mb_detect_order 945 946 */ 946 947 function test_wp_json_encode_non_utf8() { 947 if ( ! function_exists( 'mb_detect_order' ) ) {948 $this->markTestSkipped( 'mbstring extension not available.' );949 }950 951 948 $charsets = mb_detect_order(); 952 949 $old_charsets = $charsets; … … 968 965 /** 969 966 * @ticket 28786 967 * @requires function mb_detect_order 970 968 */ 971 969 function test_wp_json_encode_non_utf8_in_array() { 972 if ( ! function_exists( 'mb_detect_order' ) ) {973 $this->markTestSkipped( 'mbstring extension not available.' );974 }975 976 970 $charsets = mb_detect_order(); 977 971 $old_charsets = $charsets; … … 1211 1205 * @ticket 39550 1212 1206 * @dataProvider _wp_check_filetype_and_ext_data 1207 * @requires extension fileinfo 1213 1208 */ 1214 1209 function test_wp_check_filetype_and_ext( $file, $filename, $expected ) { 1215 if ( ! extension_loaded( 'fileinfo' ) ) {1216 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );1217 }1218 1219 1210 $this->assertSame( $expected, wp_check_filetype_and_ext( $file, $filename ) ); 1220 1211 } … … 1223 1214 * @ticket 39550 1224 1215 * @group ms-excluded 1216 * @requires extension fileinfo 1225 1217 */ 1226 1218 function test_wp_check_filetype_and_ext_with_filtered_svg() { 1227 if ( ! extension_loaded( 'fileinfo' ) ) {1228 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );1229 }1230 1231 1219 $file = DIR_TESTDATA . '/uploads/video-play.svg'; 1232 1220 $filename = 'video-play.svg'; … … 1248 1236 * @ticket 39550 1249 1237 * @group ms-excluded 1238 * @requires extension fileinfo 1250 1239 */ 1251 1240 function test_wp_check_filetype_and_ext_with_filtered_woff() { 1252 if ( ! extension_loaded( 'fileinfo' ) ) {1253 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );1254 }1255 1256 1241 $file = DIR_TESTDATA . '/uploads/dashicons.woff'; 1257 1242 $filename = 'dashicons.woff'; -
trunk/tests/phpunit/tests/functions/anonymization.php
r49006 r49025 26 26 * @ticket 41083 27 27 * @ticket 43545 28 * @requires function inet_ntop 29 * @requires function inet_pton 28 30 * 29 31 * @param string $raw_ip Raw IP address. … … 31 33 */ 32 34 public function test_wp_privacy_anonymize_ip( $raw_ip, $expected_result ) { 33 if ( ! function_exists( 'inet_ntop' ) || ! function_exists( 'inet_pton' ) ) {34 $this->markTestSkipped( 'This test requires both the inet_ntop() and inet_pton() functions.' );35 }36 37 35 $actual_result = wp_privacy_anonymize_data( 'ip', $raw_ip ); 38 36 -
trunk/tests/phpunit/tests/http/functions.php
r48937 r49025 4 4 * @group http 5 5 * @group external-http 6 * @requires extension openssl 6 7 */ 7 8 class Tests_HTTP_Functions extends WP_UnitTestCase { 8 9 public function setUp() {10 if ( ! extension_loaded( 'openssl' ) ) {11 $this->markTestSkipped( 'Tests_HTTP_Functions requires openssl.' );12 }13 14 parent::setUp();15 }16 9 17 10 function test_head_request() { -
trunk/tests/phpunit/tests/image/editorImagick.php
r48937 r49025 549 549 * 550 550 * @ticket 37140 551 * @requires function exif_read_data 551 552 */ 552 553 public function test_remove_orientation_data_on_rotate() { 553 if ( ! function_exists( 'exif_read_data' ) ) {554 $this->markTestSkipped( 'This test requires the exif_read_data function.' );555 }556 557 554 $file = DIR_TESTDATA . '/images/test-image-upside-down.jpg'; 558 555 $data = wp_read_image_metadata( $file ); -
trunk/tests/phpunit/tests/image/functions.php
r49024 r49025 150 150 * 151 151 * @ticket 6821 152 * @requires extension fileinfo 152 153 */ 153 154 public function test_wp_save_image_file() { 154 if ( ! extension_loaded( 'fileinfo' ) ) {155 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );156 }157 158 155 $classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); 159 156 … … 209 206 * 210 207 * @ticket 6821 208 * @requires extension fileinfo 211 209 */ 212 210 public function test_mime_overrides_filename() { 213 if ( ! extension_loaded( 'fileinfo' ) ) {214 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );215 }216 217 211 $classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); 218 212 … … 254 248 * 255 249 * @ticket 6821 250 * @requires extension fileinfo 256 251 */ 257 252 public function test_inferred_mime_types() { 258 if ( ! extension_loaded( 'fileinfo' ) ) {259 $this->markTestSkipped( 'The fileinfo PHP extension is not loaded.' );260 }261 262 253 $classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); 263 254 … … 374 365 /** 375 366 * @requires function imagejpeg 367 * @requires extension openssl 376 368 */ 377 369 public function test_wp_crop_image_url() { 378 if ( ! extension_loaded( 'openssl' ) ) {379 $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url() requires openssl.' );380 }381 382 370 $file = wp_crop_image( 383 371 'https://asdftestblog1.files.wordpress.com/2008/04/canola.jpg', … … 419 407 } 420 408 409 /** 410 * @requires extension openssl 411 */ 421 412 public function test_wp_crop_image_url_not_exist() { 422 if ( ! extension_loaded( 'openssl' ) ) {423 $this->markTestSkipped( 'Tests_Image_Functions::test_wp_crop_image_url_not_exist() requires openssl.' );424 }425 426 413 $file = wp_crop_image( 427 414 'https://asdftestblog1.files.wordpress.com/2008/04/canoladoesnotexist.jpg', -
trunk/tests/phpunit/tests/image/meta.php
r48937 r49025 5 5 * @group media 6 6 * @group upload 7 * @requires extension gd 8 * @requires extension exif 7 9 */ 8 10 class Tests_Image_Meta extends WP_UnitTestCase { 9 function setUp() {10 if ( ! extension_loaded( 'gd' ) ) {11 $this->markTestSkipped( 'The gd PHP extension is not loaded.' );12 }13 if ( ! extension_loaded( 'exif' ) ) {14 $this->markTestSkipped( 'The exif PHP extension is not loaded.' );15 }16 17 parent::setUp();18 }19 11 20 12 function test_exif_d70() { -
trunk/tests/phpunit/tests/oembed/headers.php
r46586 r49025 9 9 */ 10 10 class Tests_oEmbed_HTTP_Headers extends WP_UnitTestCase { 11 12 /** 13 * @requires function xdebug_get_headers 14 */ 11 15 function test_rest_pre_serve_request_headers() { 12 if ( ! function_exists( 'xdebug_get_headers' ) ) {13 $this->markTestSkipped( 'xdebug is required for this test' );14 }15 16 16 $post = $this->factory()->post->create_and_get( 17 17 array(
Note: See TracChangeset
for help on using the changeset viewer.