Index: modules/system/system.test =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.test,v retrieving revision 1.8 diff -u -r1.8 system.test --- modules/system/system.test 29 Jun 2008 11:39:38 -0000 1.8 +++ modules/system/system.test 30 Jun 2008 00:58:21 -0000 @@ -186,12 +186,15 @@ $this->drupalPost('admin/settings/ip-blocking', $edit, t('Save')); $this->assertText(t('Please enter a valid IP address.')); - // Submit your own IP address. This fails, although it works when testing manually. - // TODO: on some systems this test fails due to a bug or inconsistency in cURL. - // $edit = array(); - // $edit['ip'] = ip_address(); - // $this->drupalPost('admin/settings/ip-blocking', $edit, t('Save')); - // $this->assertText(t('You may not block your own IP address.')); + // Submit your own IP address. + $edit = array(); + // We assume during the tests that the base URL points back to ourself. + // In that case, because we are hitting the loopback interface, + // the client IP address will in fact be the target IP address. + $parsed = parse_url($GLOBALS['base_url']); + $edit['ip'] = gethostbyname($parsed['host']); + $this->drupalPost('admin/settings/ip-blocking', $edit, t('Save')); + $this->assertText(t('You may not block your own IP address.')); } }