Skip to content

Commit b1f1b29

Browse files
authored
Improve WP Stream Connector mock log method signature (#2370)
1 parent c9950fb commit b1f1b29

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tests/phpunit/tests/integration/class-test-stream-connector.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -761,12 +761,21 @@ public function is_dependency_satisfied() {
761761
}
762762

763763
/**
764-
* Log activity.
764+
* Log handler.
765765
*
766-
* @param array $args Log arguments.
766+
* @param string $message sprintf-ready error message string.
767+
* @param array $args sprintf (and extra) arguments to use.
768+
* @param int|null $object_id Target object id (if any).
769+
* @param string $context Context of the event.
770+
* @param string $action Action of the event.
771+
* @param int $user_id User responsible for the event.
772+
*
773+
* @return bool
767774
*/
768-
public function log( $args ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
775+
public function log( $message, $args, $object_id, $context, $action, $user_id = null ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable, Generic.CodeAnalysis.UnusedFunctionParameter
769776
// Mock implementation - parameter intentionally unused.
777+
778+
return true;
770779
}
771780
}
772781

0 commit comments

Comments
 (0)