diff --git a/tests/phpunit/tests/db.php b/tests/phpunit/tests/db.php
index c3d43b1fa3..c56a13c805 100644
|
a
|
b
|
function test_prepare_sprintf() { |
| 379 | 379 | |
| 380 | 380 | /** |
| 381 | 381 | * @expectedIncorrectUsage wpdb::prepare |
| | 382 | * @requires PHP < 8.0 |
| 382 | 383 | */ |
| 383 | 384 | function test_prepare_sprintf_invalid_args() { |
| 384 | 385 | global $wpdb; |
| … |
… |
function test_prepare_vsprintf() { |
| 401 | 402 | |
| 402 | 403 | /** |
| 403 | 404 | * @expectedIncorrectUsage wpdb::prepare |
| | 405 | * @requires PHP < 8.0 |
| 404 | 406 | */ |
| 405 | 407 | function test_prepare_vsprintf_invalid_args() { |
| 406 | 408 | global $wpdb; |
| … |
… |
function test_prepare_vsprintf_invalid_args() { |
| 418 | 420 | * @ticket 42040 |
| 419 | 421 | * @dataProvider data_prepare_incorrect_arg_count |
| 420 | 422 | * @expectedIncorrectUsage wpdb::prepare |
| | 423 | * @requires PHP < 8.0 |
| 421 | 424 | */ |
| 422 | 425 | public function test_prepare_incorrect_arg_count( $query, $args, $expected ) { |
| 423 | 426 | global $wpdb; |
diff --git a/tests/phpunit/tests/functions/deprecated.php b/tests/phpunit/tests/functions/deprecated.php
index 758ab0228a..fb79b90afb 100644
|
a
|
b
|
protected function was_deprecated( $type, $name ) { |
| 140 | 140 | * |
| 141 | 141 | * @ticket 6821 |
| 142 | 142 | * @expectedDeprecated wp_save_image_file |
| | 143 | * @requires extension gd |
| 143 | 144 | */ |
| 144 | 145 | public function test_wp_save_image_file_deprecated_with_gd_resource() { |
| 145 | 146 | if ( ! function_exists( 'imagejpeg' ) ) { |
| … |
… |
public function test_wp_save_image_file_deprecated_with_gd_resource() { |
| 163 | 164 | * Tests that wp_save_image_file() doesn't have a deprecated argument when passed a WP_Image_Editor. |
| 164 | 165 | * |
| 165 | 166 | * @ticket 6821 |
| | 167 | * @requires extension gd |
| 166 | 168 | */ |
| 167 | 169 | public function test_wp_save_image_file_not_deprecated_with_wp_image_editor() { |
| 168 | 170 | if ( ! function_exists( 'imagejpeg' ) ) { |
diff --git a/tests/phpunit/tests/image/functions.php b/tests/phpunit/tests/image/functions.php
index 4a7713d52b..5b03d6cbf4 100644
|
a
|
b
|
public function test_load_directory() { |
| 301 | 301 | } |
| 302 | 302 | } |
| 303 | 303 | |
| | 304 | /** |
| | 305 | * @requires extension gd |
| | 306 | */ |
| 304 | 307 | public function test_wp_crop_image_file() { |
| 305 | 308 | if ( ! function_exists( 'imagejpeg' ) ) { |
| 306 | 309 | $this->fail( 'jpeg support unavailable' ); |
| … |
… |
public function test_wp_crop_image_file() { |
| 325 | 328 | unlink( $file ); |
| 326 | 329 | } |
| 327 | 330 | |
| | 331 | /** |
| | 332 | * @requires extension gd |
| | 333 | * @requires extension openssl |
| | 334 | */ |
| 328 | 335 | public function test_wp_crop_image_url() { |
| 329 | 336 | if ( ! function_exists( 'imagejpeg' ) ) { |
| 330 | 337 | $this->fail( 'jpeg support unavailable' ); |
diff --git a/tests/phpunit/tests/image/intermediateSize.php b/tests/phpunit/tests/image/intermediateSize.php
index c7d8307afc..0ad6c1b6ae 100644
|
a
|
b
|
function test_make_intermediate_size_no_size() { |
| 28 | 28 | $this->assertFalse( $image ); |
| 29 | 29 | } |
| 30 | 30 | |
| | 31 | /** |
| | 32 | * @requires extension gd |
| | 33 | */ |
| 31 | 34 | function test_make_intermediate_size_width() { |
| 32 | 35 | if ( ! function_exists( 'imagejpeg' ) ) { |
| 33 | 36 | $this->fail( 'jpeg support unavailable' ); |
| … |
… |
function test_make_intermediate_size_width() { |
| 38 | 41 | $this->assertInternalType( 'array', $image ); |
| 39 | 42 | } |
| 40 | 43 | |
| | 44 | /** |
| | 45 | * @requires extension gd |
| | 46 | */ |
| 41 | 47 | function test_make_intermediate_size_height() { |
| 42 | 48 | if ( ! function_exists( 'imagejpeg' ) ) { |
| 43 | 49 | $this->fail( 'jpeg support unavailable' ); |
| … |
… |
function test_make_intermediate_size_height() { |
| 48 | 54 | $this->assertInternalType( 'array', $image ); |
| 49 | 55 | } |
| 50 | 56 | |
| | 57 | /** |
| | 58 | * @requires extension gd |
| | 59 | */ |
| 51 | 60 | function test_make_intermediate_size_successful() { |
| 52 | 61 | if ( ! function_exists( 'imagejpeg' ) ) { |
| 53 | 62 | $this->fail( 'jpeg support unavailable' ); |
diff --git a/tests/phpunit/tests/post/attachments.php b/tests/phpunit/tests/post/attachments.php
index 8acb0b0068..ad0ffe532c 100644
|
a
|
b
|
function test_insert_image_no_thumb() { |
| 54 | 54 | $this->assertEquals( 50, $downsize[2] ); |
| 55 | 55 | } |
| 56 | 56 | |
| | 57 | /** |
| | 58 | * @requires extension gd |
| | 59 | */ |
| 57 | 60 | function test_insert_image_thumb_only() { |
| 58 | 61 | if ( ! function_exists( 'imagejpeg' ) ) { |
| 59 | 62 | $this->fail( 'jpeg support unavailable' ); |
| … |
… |
function test_insert_image_thumb_only() { |
| 106 | 109 | $this->assertEquals( 300, $downsize[2] ); |
| 107 | 110 | } |
| 108 | 111 | |
| | 112 | /** |
| | 113 | * @requires extension gd |
| | 114 | */ |
| 109 | 115 | function test_insert_image_medium_sizes() { |
| 110 | 116 | if ( ! function_exists( 'imagejpeg' ) ) { |
| 111 | 117 | $this->fail( 'jpeg support unavailable' ); |
| … |
… |
function test_insert_image_medium_sizes() { |
| 164 | 170 | $this->assertEquals( 1024, $downsize[2] ); |
| 165 | 171 | } |
| 166 | 172 | |
| 167 | | |
| | 173 | /** |
| | 174 | * @requires extension gd |
| | 175 | */ |
| 168 | 176 | function test_insert_image_delete() { |
| 169 | 177 | if ( ! function_exists( 'imagejpeg' ) ) { |
| 170 | 178 | $this->fail( 'jpeg support unavailable' ); |