From 268f249e8d98e8b91f51f4d39cfc060efbd5caab Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 24 Mar 2015 10:46:29 +0100 Subject: [PATCH] ensure commands can be serialized in unit tests --- lib/private/command/queuebus.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/private/command/queuebus.php b/lib/private/command/queuebus.php index 953479086ca..e5604eb1fef 100644 --- a/lib/private/command/queuebus.php +++ b/lib/private/command/queuebus.php @@ -39,7 +39,10 @@ class QueueBus implements IBus { */ private function runCommand($command) { if ($command instanceof ICommand) { - $command->handle(); + // ensure the command can be serialized + $serialized = serialize($command); + $unserialized = unserialize($serialized); + $unserialized->handle(); } else { $command(); } -- 2.39.5