From ab8b2bf291be025ca00459eb2b97e5aa230141a7 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Sun, 9 Oct 2022 19:58:38 +0200
Subject: [PATCH] CS: fix a non snake_case function name
Note: if I'm honest, this whole function declaration should be changed as it is now declared as a function in the global namespace, while only intended for one test (yikes!).
---
tests/phpunit/tests/blocks/wpBlock.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/phpunit/tests/blocks/wpBlock.php b/tests/phpunit/tests/blocks/wpBlock.php
index c67a30df9d..09d0624417 100644
a
|
b
|
class Tests_Blocks_wpBlock extends WP_UnitTestCase { |
604 | 604 | ), |
605 | 605 | ); |
606 | 606 | $block = new WP_Block( $parsed_block, $context, $this->registry ); |
607 | | function filterQuery( $query, $block, $page ) { |
| 607 | function filter_the_query( $query, $block, $page ) { |
608 | 608 | $query['post_type'] = 'book'; |
609 | 609 | return $query; |
610 | 610 | } |
611 | | add_filter( 'query_loop_block_query_vars', 'filterQuery', 10, 3 ); |
| 611 | add_filter( 'query_loop_block_query_vars', 'filter_the_query', 10, 3 ); |
612 | 612 | $query = build_query_vars_from_query_block( $block, 1 ); |
613 | | remove_filter( 'query_loop_block_query_vars', 'filterQuery' ); |
| 613 | remove_filter( 'query_loop_block_query_vars', 'filter_the_query' ); |
614 | 614 | $this->assertSame( |
615 | 615 | $query, |
616 | 616 | array( |