protected function IpAnonymizeTestCase::getIp in IP Anonymize 8
Get IP address from watchdog table.
1 call to IpAnonymizeTestCase::getIp()
- IpAnonymizeTestCase::testIpAnonymize in tests/
src/ Functional/ IpAnonymizeTestCase.php - Basic tests for IP Anonymize module.
File
- tests/
src/ Functional/ IpAnonymizeTestCase.php, line 53
Class
- IpAnonymizeTestCase
- Tests basic IP Anonymize functionality.
Namespace
Drupal\Tests\ip_anon\FunctionalCode
protected function getIp() {
return $this->container
->get('database')
->select('watchdog', 'w')
->fields('w', [
'hostname',
])
->orderBy('wid')
->range(0, 1)
->execute()
->fetchField();
}