WordPress.org

Make WordPress Core

Ticket #47704: 47704-Tests_TermExists-test_term_.patch

File 47704-Tests_TermExists-test_term_.patch, 927 bytes (added by jrf, 12 months ago)

PHP 7.4/array-access: Fix Tests_TermExists::test_term_exists_taxonomy_nonempty_parent_0_should_return_false_for_child_term() - fixes 1 faulty unit test

  • tests/phpunit/tests/term/termExists.php

    From 1ce51bd65032da5193dc0e39805071b0aeb82252 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Mon, 15 Jul 2019 01:09:45 +0200
    Subject: [PATCH] PHP 7.4/array-access: Fix
     Tests_TermExists::test_term_exists_taxonomy_nonempty_parent_0_should_return_false_for_child_term()
    
    ---
     tests/phpunit/tests/term/termExists.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/tests/phpunit/tests/term/termExists.php b/tests/phpunit/tests/term/termExists.php
    index 658cac087a..a99aefbb76 100644
    a b class Tests_TermExists extends WP_UnitTestCase { 
    150150
    151151                _unregister_taxonomy( 'foo' );
    152152
    153                 $this->assertSame( null, $found['term_id'] );
     153                $this->assertSame( null, $found );
    154154        }
    155155
    156156        public function test_term_exists_taxonomy_nonempty_parent_nonempty_match_name() {