Skip to:
Content

BuddyPress.org

Ticket #7325: 7325-tests-anonymous-functions.diff

File 7325-tests-anonymous-functions.diff, 637 bytes (added by tw2113, 3 years ago)
  • tests/phpunit/testcases/core/class-bp-user-query.php

    diff --git tests/phpunit/testcases/core/class-bp-user-query.php tests/phpunit/testcases/core/class-bp-user-query.php
    index 1a87f70..760d104 100644
    class BP_Tests_BP_User_Query_TestCases extends BP_UnitTestCase { 
    175175                        'last_activity' => date( 'Y-m-d H:i:s', $now - 60*6 ),
    176176                ) );
    177177
    178                 add_filter( 'bp_user_query_online_interval', create_function( '', 'return 5;' ) );
     178                add_filter( 'bp_user_query_online_interval', function() { return 5; } );
    179179
    180180                $q = new BP_User_Query( array(
    181181                        'type' => 'online',