Add tests & default reason

This commit is contained in:
Philipp Holzer 2019-04-20 12:53:17 +02:00
parent e25f269aab
commit 55d2473ec2
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
3 changed files with 284 additions and 87 deletions

View file

@ -16,6 +16,8 @@ use Friendica\Core\Config\Configuration;
*/
class BlockedServers extends Console
{
const DEFAULT_REASON = 'blocked';
protected $helpOptions = ['h', 'help', '?'];
protected function getHelp()
@ -97,7 +99,7 @@ HELP;
}
}
$reason = (count($this->args) === 3) ? $this->getArgument(2) : 'blocked';
$reason = (count($this->args) === 3) ? $this->getArgument(2) : self::DEFAULT_REASON;
$blocklist[] = [
'domain' => $domain,