Make WordPress Core


Ignore:
Timestamp:
09/12/2013 04:16:59 AM (11 years ago)
Author:
wonderboymusic
Message:

Fix the PHP 5.4 Only variables should be passed by reference notices in tests/filters.php.

See #25282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/filters.php

    r25254 r25377  
    2121        $this->assertEquals(array($tag), $a->get_tags());
    2222
    23         $args = array_pop($a->get_args());
     23        $argsvar = $a->get_args();
     24        $args = array_pop( $argsvar );
    2425        $this->assertEquals(array($val), $args);
    2526    }
     
    8889
    8990        $this->assertEquals(1, $a->get_call_count());
    90         $this->assertEquals(array($val, $arg1), array_pop($a->get_args()));
     91        $argsvar = $a->get_args();
     92        $this->assertEquals( array( $val, $arg1 ), array_pop( $argsvar ) );
    9193    }
    9294
     
    107109        // a1 should be called with both args
    108110        $this->assertEquals(1, $a1->get_call_count());
    109         $this->assertEquals(array($val, $arg1, $arg2), array_pop($a1->get_args()));
     111        $argsvar1 = $a1->get_args();
     112        $this->assertEquals( array( $val, $arg1, $arg2 ), array_pop( $argsvar1 ) );
    110113
    111114        // a2 should be called with one only
    112115        $this->assertEquals(1, $a2->get_call_count());
    113         $this->assertEquals(array($val), array_pop($a2->get_args()));
     116        $argsvar2 = $a2->get_args();
     117        $this->assertEquals( array( $val ), array_pop( $argsvar2 ) );
    114118    }
    115119
     
    247251    }
    248252
    249         /**
    250         * @ticket 21169
    251         */
     253    /**
     254    * @ticket 21169
     255    */
    252256    function test_filter_removal_during_filter() {
    253257        $tag = rand_str();
Note: See TracChangeset for help on using the changeset viewer.