You are here

public function SpambotUserspamTest::testSpambotReportAccountEmptyApiKey in Spambot 8

Test spambot_report_account() function without "api_key".

File

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

Class

SpambotUserspamTest
Test spambot report account.

Namespace

Drupal\Tests\spambot\Kernel

Code

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