public function securityLevelAction()
 {
     $domain = $this->params('domain');
     $level = $this->params('level');
     if (null === $level) {
         return sprintf("\nSecurity level for \"%s\" domain: %s\n\n", $domain, $this->settingsService->getSecurityLevel($domain));
     }
     $this->settingsService->setSecurityLevel($domain, $level);
     return sprintf("\nSecurity level for domain %s changed\n\n", $domain);
 }
 public function testSetSecurityLevel()
 {
     $securityLevel = SettingsService::SECURITY_LEVEL_LOW;
     $this->service->expects($this->once())->method('send')->with(array('a' => 'sec_lvl', 'z' => 'domain.com', 'v' => $securityLevel));
     $this->service->setSecurityLevel('domain.com', $securityLevel);
 }