diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-03-24 10:46:29 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-03-26 17:07:02 +0100 |
commit | 268f249e8d98e8b91f51f4d39cfc060efbd5caab (patch) | |
tree | c72676ae09a9e0c1a48eaf6f1342dc32ce0f06d8 | |
parent | 176fba83eae36f39b987d1076fbad72be901add0 (diff) | |
download | nextcloud-server-268f249e8d98e8b91f51f4d39cfc060efbd5caab.tar.gz nextcloud-server-268f249e8d98e8b91f51f4d39cfc060efbd5caab.zip |
ensure commands can be serialized in unit tests
-rw-r--r-- | lib/private/command/queuebus.php | 5 |
1 files changed, 4 insertions, 1 deletions
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(); } |