public function IPBanFormTest::testSetCountry in IP Ban 7
Same name and namespace in other branches
- 8 ip_ban.test \IPBanFormTest::testSetCountry()
Test setting setting the US within the table.
File
- ./
ip_ban.test, line 120 - Tests for ip_ban.module.
Class
- IPBanFormTest
- Tests the IP Ban admin page form.
Code
public function testSetCountry() {
// Set the United States to Complete Ban.
$this
->drupalGet(IP_BAN_ADMIN_FORM_PATH);
$edit = array();
// 0 = no action / 1 = Read Only / 2 = Complete Ban.
$edit['ip_ban_US'] = 2;
$this
->drupalPost(IP_BAN_ADMIN_FORM_PATH, $edit, t('Save configuration'));
$this
->assertOptionSelected('edit-ip-ban-us', 2, 'Complete ban set correctly in country list table.');
}