Make WordPress Core

Ticket #56706: 56706.diff

File 56706.diff, 941 bytes (added by costdev, 3 years ago)
  • tests/phpunit/tests/functions/wpListPluck.php

    diff --git a/tests/phpunit/tests/functions/wpListPluck.php b/tests/phpunit/tests/functions/wpListPluck.php
    index 10c78ed9bd..a844b050fb 100644
    a b class Tests_Functions_wpListPluck extends WP_UnitTestCase { 
    1111        public $array_list  = array();
    1212
    1313        public function set_up() {
    14                 parent::set_up();
     14                /*
     15                 * This method deliberately does not call parent::set_up(). Why?
     16                 *
     17                 * The call stack for WP_UnitTestCase_Base::set_up() includes a call to
     18                 * WP_List_Util::pluck(), which creates an inaccurate coverage report
     19                 * for this method.
     20                 *
     21                 * To ensure that deprecation and incorrect usage notices continue to be
     22                 * detectable, this method uses WP_UnitTestCase_Base::expectDeprecated().
     23                 */
     24                $this->expectDeprecated();
     25
    1526                $this->array_list['foo'] = array(
    1627                        'name'   => 'foo',
    1728                        'id'     => 'f',