Skip to content

Commit 4c89a9b

Browse files
committed
More tests for the return type of apply_filters() and related functions.
1 parent 5d598d5 commit 4c89a9b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/data/apply_filters.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,21 @@
169169
/** This filter is documented in foo.php */
170170
$value = apply_filters('foo', 123);
171171
assertType('mixed', $value);
172+
173+
/**
174+
* Return type for `apply_filters_ref_array()`.
175+
*
176+
* @param string $foo Hello.
177+
* @param int $bar World.
178+
*/
179+
$value = apply_filters_ref_array('foo', ['Hello',123]);
180+
assertType('string', $value);
181+
182+
/**
183+
* Return type for `apply_filters_deprecated()`.
184+
*
185+
* @param string $foo Hello.
186+
* @param bool $bar World.
187+
*/
188+
$value = apply_filters_deprecated('foo', 'Hello', true);
189+
assertType('string', $value);

0 commit comments

Comments
 (0)