Skip to content

Commit ebeeea0

Browse files
committed
Add test for whitelist filter.
1 parent 2e7ea99 commit ebeeea0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/phpunit/test_generate_ignored_list.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,15 @@ function test_generate_ignored_list_version_55() {
7070
$this->assertNotContains( '*/fakeplugin/*', $ignored );
7171
$this->assertNotContains( '*/oldplugin/*', $ignored );
7272
}
73+
74+
function test_filter_ignored_list() {
75+
76+
tests_add_filter( 'phpcompat_whitelist', function( $whitelist ) {
77+
return array_merge( $whitelist, array( '*/filterplugin/*') );
78+
} );
79+
80+
$ignored = $this->wpephpc->generate_ignored_list();
81+
82+
$this->assertContains( '*/filterplugin/*', $ignored );
83+
}
7384
}

0 commit comments

Comments
 (0)