You are here

protected function IpAnonymizeTestCase::testIpAnonymize in IP Anonymize 7

Basic tests for IP Anonymize module.

File

./ip_anon.test, line 34
Tests for IP Anonymize module.

Class

IpAnonymizeTestCase
Tests basic IP Anonymize functionality.

Code

protected function testIpAnonymize() {
  $admin_user = $this
    ->drupalCreateUser(array(
    'administer site configuration',
  ));
  $this
    ->drupalLogin($admin_user);
  $this
    ->assertTrue($this
    ->getIp());
  $config['ip_anon_policy'] = 1;
  $config['ip_anon_period_watchdog'] = 0;
  $this
    ->drupalPost('admin/config/people/ip_anon', $config, t('Save configuration'));
  $this
    ->cronRun();
  $this
    ->assertFalse($this
    ->getIp());
}