Make WordPress Core

Ticket #50671: 50671.diff

File 50671.diff, 820 bytes (added by TimothyBlynJacobs, 5 years ago)
  • tests/phpunit/tests/rest-api/rest-plugins-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-plugins-controller.php b/tests/phpunit/tests/rest-api/rest-plugins-controller.php
    index 26ed4cc4c0..77203a73d3 100644
    a b class WP_REST_Plugins_Controller_Test extends WP_Test_REST_Controller_Testcase { 
    10131013                copy( DIR_TESTDATA . '/plugins/link-manager.zip', DIR_TESTDATA . '/link-manager.zip' );
    10141014                add_filter(
    10151015                        'upgrader_pre_download',
    1016                         function () {
    1017                                 return DIR_TESTDATA . '/link-manager.zip';
    1018                         }
     1016                        static function ( $reply, $package, $upgrader ) {
     1017                                if ( $upgrader instanceof Plugin_Upgrader ) {
     1018                                        $reply = DIR_TESTDATA . '/link-manager.zip';
     1019                                }
     1020
     1021                                return $reply;
     1022                        },
     1023                        10,
     1024                        3
    10191025                );
    10201026        }
    10211027