WordPress.org

Make WordPress Core

Ticket #42311: tests.diff

File tests.diff, 639 bytes (added by withinboredom, 3 years ago)

Patch to fix test

  • tests/phpunit/tests/hooks/doAction.php

    diff --git a/tests/phpunit/tests/hooks/doAction.php b/tests/phpunit/tests/hooks/doAction.php
    index 18d62521ac..6aedbb5139 100755
    a b class Tests_WP_Hook_Do_Action extends WP_UnitTestCase { 
    7777                $arg = __FUNCTION__ . '_arg';
    7878
    7979                $hook->add_filter( $tag, $callback_one, $priority, $accepted_args );
    80                 $hook->add_filter( $tag, $callback_two, $priority, $accepted_args );
     80                $hook->add_filter( $tag, $callback_two, $priority + 1, $accepted_args );
    8181                $hook->do_action( array( $arg ) );
    8282
    8383                $this->assertEquals( 1, $a->get_call_count() );