You are here

protected function IpAnonymizeTestCase::getIp in IP Anonymize 7

Get IP address from watchdog table.

1 call to IpAnonymizeTestCase::getIp()
IpAnonymizeTestCase::testIpAnonymize in ./ip_anon.test
Basic tests for IP Anonymize module.

File

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

Class

IpAnonymizeTestCase
Tests basic IP Anonymize functionality.

Code

protected function getIp() {
  return db_select('watchdog', 'w')
    ->fields('w', array(
    'hostname',
  ))
    ->range(0, 1)
    ->execute()
    ->fetchField();
}