Issue #2784561 by stefan.r, GoZ, Fabianx: [D7] IpAddressBlockingTest is failing on DrupalCI for PHP 7

merge-requests/26/head
Fabian Franz 2016-08-18 06:11:16 -07:00
parent 14bd92bc6f
commit 29473bdf1e
2 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ class StatisticsTestCase extends DrupalWebTestCase {
'title' => 'test',
'path' => 'node/1',
'url' => 'http://example.com',
'hostname' => '192.168.1.1',
'hostname' => '1.2.3.3',
'uid' => 0,
'sid' => 10,
'timer' => 10,
@ -268,7 +268,7 @@ class StatisticsBlockVisitorsTestCase extends StatisticsTestCase {
*/
function testIPAddressBlocking() {
// IP address for testing.
$test_ip_address = '192.168.1.1';
$test_ip_address = '1.2.3.3';
// Verify the IP address from accesslog appears on the top visitors page
// and that a 'block IP address' link is displayed.

View File

@ -726,7 +726,7 @@ class IPAddressBlockingTestCase extends DrupalWebTestCase {
// Block a valid IP address.
$edit = array();
$edit['ip'] = '192.168.1.1';
$edit['ip'] = '1.2.3.3';
$this->drupalPost('admin/config/people/ip-blocking', $edit, t('Add'));
$ip = db_query("SELECT iid from {blocked_ips} WHERE ip = :ip", array(':ip' => $edit['ip']))->fetchField();
$this->assertTrue($ip, t('IP address found in database.'));
@ -734,7 +734,7 @@ class IPAddressBlockingTestCase extends DrupalWebTestCase {
// Try to block an IP address that's already blocked.
$edit = array();
$edit['ip'] = '192.168.1.1';
$edit['ip'] = '1.2.3.3';
$this->drupalPost('admin/config/people/ip-blocking', $edit, t('Add'));
$this->assertText(t('This IP address is already blocked.'));