Skip to content

Commit c85d1ad

Browse files
committed
TestSetterAndGetter: Apply the stirng callback fix also to 'value_callback', 'setter_callback' and 'expect_callback'
1 parent caa9a0d commit c85d1ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TestCase/TestSetterAndGetterTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ private function setterAndGetterNormalizeSpec($spec, string $name, object $targe
298298
case 'value_callback':
299299
case 'setter_value_callback':
300300
case 'expect_callback':
301-
if (is_string($value)) {
301+
if (is_string($value) && !is_callable($value)) {
302302
$value = [$this, $value];
303303
}
304304

0 commit comments

Comments
 (0)