mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
ensure commands can be serialized in unit tests
This commit is contained in:
parent
176fba83ea
commit
268f249e8d
1 changed files with 4 additions and 1 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue