Skip to content

Commit 12bbca3

Browse files
authored
Merge pull request #877 from nextcloud/refactor/improve-test-command
refactor: improve test command
2 parents 5141b68 + 95bb6d4 commit 12bbca3

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

lib/Command/Test.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,25 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5959
return 1;
6060
}
6161

62-
$gateway->send($identifier, 'Test', ['code' => '123456']);
62+
$message = 'Test';
63+
64+
$output->writeln('');
65+
$output->writeln('<info>════════════════════════════════════════════════════════════════</info>');
66+
$output->writeln('<info> Two-Factor Gateway Test</info>');
67+
$output->writeln('<info>════════════════════════════════════════════════════════════════</info>');
68+
$output->writeln('');
69+
$output->writeln(' <comment>Gateway:</comment> ' . $gatewayName);
70+
$output->writeln(' <comment>Recipient:</comment> ' . $identifier);
71+
$output->writeln(' <comment>Message:</comment> ' . $message);
72+
$output->writeln('');
73+
$output->writeln('<info>Sending message...</info>');
74+
75+
$gateway->send($identifier, $message);
76+
77+
$output->writeln('');
78+
$output->writeln('<info>✓ Message successfully sent!</info>');
79+
$output->writeln('');
80+
6381
return 0;
6482
}
6583
}

0 commit comments

Comments
 (0)