public function IpAnonymizeTestCase::testIpAnonymize in IP Anonymize 8
Basic tests for IP Anonymize module.
File
- tests/
src/ Functional/ IpAnonymizeTestCase.php, line 34
Class
- IpAnonymizeTestCase
- Tests basic IP Anonymize functionality.
Namespace
Drupal\Tests\ip_anon\FunctionalCode
public function testIpAnonymize() {
$admin_user = $this
->drupalCreateUser([
'administer site configuration',
]);
$this
->drupalLogin($admin_user);
$this
->assertNotEmpty($this
->getIp());
$this
->drupalGet('admin/config/people/ip_anon');
$config['policy'] = 1;
$config['period_watchdog'] = 0;
$this
->submitForm($config, $this
->t('Save configuration'));
$this
->cronRun();
$this
->assertEmpty($this
->getIp());
}