You are here

public function SpambotUserspamTest::testSpambotReportAccountIncorrectApiKey in Spambot 8

Test spambot_report_account() function with incorrect "api_key".

File

tests/src/Kernel/SpambotUserspamTest.php, line 54

Class

SpambotUserspamTest
Test spambot report account.

Namespace

Drupal\Tests\spambot\Kernel

Code

public function testSpambotReportAccountIncorrectApiKey() {
  $key = 'notExist503';
  $success = spambot_report_account($this->user, '130.176.13.140', 'title', $key);
  $this
    ->assertFalse($success, 'Field api key should not be filled.');
}