Skip to content

Commit 75b77d8

Browse files
author
Felix Arntz
committed
Remove closure from tests for PHP 5.2 compatibility.
1 parent 9298e73 commit 75b77d8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/phpunit/test_generate_ignored_list.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,14 @@ function test_generate_ignored_list_version_55() {
7272
}
7373

7474
function test_filter_ignored_list() {
75-
tests_add_filter( 'phpcompat_whitelist', function( $whitelist ) {
76-
return array_merge( $whitelist, array( '*/filterplugin/*') );
77-
} );
75+
tests_add_filter( 'phpcompat_whitelist', array( $this, '_filter_whitelist' ) );
7876

7977
$ignored = $this->wpephpc->generate_ignored_list();
8078

8179
$this->assertContains( '*/filterplugin/*', $ignored );
8280
}
81+
82+
function _filter_whitelist( $whitelist ) {
83+
return array_merge( $whitelist, array( '*/filterplugin/*') );
84+
}
8385
}

0 commit comments

Comments
 (0)