Issue #3468435: Convert IpAddressBlockingTest to a Unit and Kernel test
1 unresolved thread
Closes #3468435
Merge request reports
Activity
77 // Pass an IP address as a URL parameter and submit it. 78 $submit_ip = '1.2.3.4'; 79 $this->drupalGet('admin/config/people/ban/' . $submit_ip); 80 $this->submitForm([], 'Add'); 81 $ip = $connection->select('ban_ip', 'bi')->fields('bi', ['iid'])->condition('ip', $submit_ip)->execute()->fetchField(); 82 $this->assertNotEmpty($ip, 'IP address found in database'); 83 $this->assertSession()->pageTextContains("The IP address $submit_ip has been banned."); 84 85 // Submit your own IP address. This fails, although it works when testing 86 // manually. 87 // @todo On some systems this test fails due to a bug/inconsistency in cURL. 88 // $edit = array(); 89 // $edit['ip'] = \Drupal::request()->getClientIP(); 90 // $this->drupalGet('admin/config/people/ban'); 91 // $this->submitForm($edit, 'Save'); 92 // $this->assertSession()->pageTextContains('You may not ban your own IP address.'); added 2 commits
added 8 commits
Toggle commit list
Please register or sign in to reply