From: Robin Appelman Date: Tue, 24 Mar 2015 09:46:29 +0000 (+0100) Subject: ensure commands can be serialized in unit tests X-Git-Tag: v8.1.0alpha1~158^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=268f249e8d98e8b91f51f4d39cfc060efbd5caab;p=nextcloud-server.git ensure commands can be serialized in unit tests --- 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(); }