This PR can be summarized in the following changelog entry:
Updated test dependencies
Relevant technical choices:
Composer: update BrainMonkey with dependencies
Updated:
BrainMonkey from v 2.4.0 to 2.5.0.
Note: this version contains a test breaking change which will be addressed in a subsequent commit if applicable for this repo.
Mockery from v 1.3.0 to 1.3.3.
Improved support for PHP 8.
Hamcrest-php from v 2.0.0 to 2.0.1
... which claims compatibility with PHP 8.
Patchwork from v 2.1.11 to 2.1.12
This fixes two issues which might be relevant for us.
Tests: update for changed BrainMonkey has_filter/has_action() behaviour
The WP native has_filter() and has_action() functions return a boolean if no function name is given, or the priority as an integer if a specific function is being checked or false if the function is not attached.
The BrainMonkey mock of the has_filter() and has_action() functions previously always returned a boolean.
As of version 2.5.0, they will emulate the WP native functions better and return the priority.
This updates the affected tests to check based on the new behaviour of the mock.
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
Composer: update BrainMonkey with dependencies
Updated:
Refs:
Tests: update for changed BrainMonkey has_filter/has_action() behaviour
The WP native
has_filter()
andhas_action()
functions return a boolean if no function name is given, or the priority as an integer if a specific function is being checked orfalse
if the function is not attached.The BrainMonkey mock of the
has_filter()
andhas_action()
functions previously always returned a boolean.As of version 2.5.0, they will emulate the WP native functions better and return the priority.
This updates the affected tests to check based on the new behaviour of the mock.
Refs:
Test instructions
This PR can be tested by following these steps: