WordPress.org

Make WordPress Core

Ticket #50639: 50639-1.patch

File 50639-1.patch, 4.7 KB (added by ayeshrajans, 5 months ago)
  • tests/phpunit/tests/db.php

    diff --git a/tests/phpunit/tests/db.php b/tests/phpunit/tests/db.php
    index c3d43b1fa3..c56a13c805 100644
    a b function test_prepare_sprintf() { 
    379379
    380380        /**
    381381         * @expectedIncorrectUsage wpdb::prepare
     382         * @requires PHP < 8.0
    382383         */
    383384        function test_prepare_sprintf_invalid_args() {
    384385                global $wpdb;
    function test_prepare_vsprintf() { 
    401402
    402403        /**
    403404         * @expectedIncorrectUsage wpdb::prepare
     405         * @requires PHP < 8.0
    404406         */
    405407        function test_prepare_vsprintf_invalid_args() {
    406408                global $wpdb;
    function test_prepare_vsprintf_invalid_args() { 
    418420         * @ticket 42040
    419421         * @dataProvider data_prepare_incorrect_arg_count
    420422         * @expectedIncorrectUsage wpdb::prepare
     423         * @requires PHP < 8.0
    421424         */
    422425        public function test_prepare_incorrect_arg_count( $query, $args, $expected ) {
    423426                global $wpdb;
  • tests/phpunit/tests/functions/deprecated.php

    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 ) { 
    140140         *
    141141         * @ticket 6821
    142142         * @expectedDeprecated wp_save_image_file
     143         * @requires extension gd
    143144         */
    144145        public function test_wp_save_image_file_deprecated_with_gd_resource() {
    145146                if ( ! function_exists( 'imagejpeg' ) ) {
    public function test_wp_save_image_file_deprecated_with_gd_resource() { 
    163164         * Tests that wp_save_image_file() doesn't have a deprecated argument when passed a WP_Image_Editor.
    164165         *
    165166         * @ticket 6821
     167         * @requires extension gd
    166168         */
    167169        public function test_wp_save_image_file_not_deprecated_with_wp_image_editor() {
    168170                if ( ! function_exists( 'imagejpeg' ) ) {
  • tests/phpunit/tests/image/functions.php

    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() { 
    301301                }
    302302        }
    303303
     304        /**
     305         * @requires extension gd
     306         */
    304307        public function test_wp_crop_image_file() {
    305308                if ( ! function_exists( 'imagejpeg' ) ) {
    306309                        $this->fail( 'jpeg support unavailable' );
    public function test_wp_crop_image_file() { 
    325328                unlink( $file );
    326329        }
    327330
     331        /**
     332         * @requires extension gd
     333         * @requires extension openssl
     334         */
    328335        public function test_wp_crop_image_url() {
    329336                if ( ! function_exists( 'imagejpeg' ) ) {
    330337                        $this->fail( 'jpeg support unavailable' );
  • tests/phpunit/tests/image/intermediateSize.php

    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() { 
    2828                $this->assertFalse( $image );
    2929        }
    3030
     31        /**
     32         * @requires extension gd
     33         */
    3134        function test_make_intermediate_size_width() {
    3235                if ( ! function_exists( 'imagejpeg' ) ) {
    3336                        $this->fail( 'jpeg support unavailable' );
    function test_make_intermediate_size_width() { 
    3841                $this->assertInternalType( 'array', $image );
    3942        }
    4043
     44        /**
     45         * @requires extension gd
     46         */
    4147        function test_make_intermediate_size_height() {
    4248                if ( ! function_exists( 'imagejpeg' ) ) {
    4349                        $this->fail( 'jpeg support unavailable' );
    function test_make_intermediate_size_height() { 
    4854                $this->assertInternalType( 'array', $image );
    4955        }
    5056
     57        /**
     58         * @requires extension gd
     59         */
    5160        function test_make_intermediate_size_successful() {
    5261                if ( ! function_exists( 'imagejpeg' ) ) {
    5362                        $this->fail( 'jpeg support unavailable' );
  • tests/phpunit/tests/post/attachments.php

    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() { 
    5454                $this->assertEquals( 50, $downsize[2] );
    5555        }
    5656
     57        /**
     58         * @requires extension gd
     59         */
    5760        function test_insert_image_thumb_only() {
    5861                if ( ! function_exists( 'imagejpeg' ) ) {
    5962                        $this->fail( 'jpeg support unavailable' );
    function test_insert_image_thumb_only() { 
    106109                $this->assertEquals( 300, $downsize[2] );
    107110        }
    108111
     112        /**
     113         * @requires extension gd
     114         */
    109115        function test_insert_image_medium_sizes() {
    110116                if ( ! function_exists( 'imagejpeg' ) ) {
    111117                        $this->fail( 'jpeg support unavailable' );
    function test_insert_image_medium_sizes() { 
    164170                $this->assertEquals( 1024, $downsize[2] );
    165171        }
    166172
    167 
     173        /**
     174         * @requires extension gd
     175         */
    168176        function test_insert_image_delete() {
    169177                if ( ! function_exists( 'imagejpeg' ) ) {
    170178                        $this->fail( 'jpeg support unavailable' );