mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-03 14:17:06 +00:00
Code is Poetry.
WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -8,17 +8,17 @@
|
||||
class Tests_WP_Hook_Iterator extends WP_UnitTestCase {
|
||||
|
||||
public function test_foreach() {
|
||||
$callback_one = '__return_null';
|
||||
$callback_two = '__return_false';
|
||||
$hook = new WP_Hook();
|
||||
$tag = __FUNCTION__;
|
||||
$priority = rand( 1, 100 );
|
||||
$callback_one = '__return_null';
|
||||
$callback_two = '__return_false';
|
||||
$hook = new WP_Hook();
|
||||
$tag = __FUNCTION__;
|
||||
$priority = rand( 1, 100 );
|
||||
$accepted_args = rand( 1, 100 );
|
||||
|
||||
$hook->add_filter( $tag, $callback_one, $priority, $accepted_args );
|
||||
$hook->add_filter( $tag, $callback_two, $priority + 1, $accepted_args );
|
||||
|
||||
$functions = array();
|
||||
$functions = array();
|
||||
$priorities = array();
|
||||
foreach ( $hook as $key => $callbacks ) {
|
||||
$priorities[] = $key;
|
||||
|
||||
Reference in New Issue
Block a user