diff options
author | catch <catch@35733.no-reply.drupal.org> | 2020-11-16 15:38:46 +0000 |
---|---|---|
committer | catch <catch@35733.no-reply.drupal.org> | 2020-11-16 16:51:39 +0000 |
commit | 783e7eb88eb3f0523fb118df7ad157a7899e6938 (patch) | |
tree | 6f96d3c5ed6b39ce7b34467e7e4e8bbb788328be /core/modules/ban | |
parent | 4a4770271b60d0381893e11fcc6a46a40f1e8dc0 (diff) | |
download | drupal-783e7eb88eb3f0523fb118df7ad157a7899e6938.tar.gz drupal-783e7eb88eb3f0523fb118df7ad157a7899e6938.zip |
Issue #3145005 by longwave, mondrake, cburschka, raman.b, Lal_, dww, xjm: [November 9, 2020] Remove uses of t() in drupalPostForm() calls
Diffstat (limited to 'core/modules/ban')
-rw-r--r-- | core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php index 9a177f1c107..fbc4ca70f6d 100644 --- a/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php +++ b/core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php @@ -38,7 +38,7 @@ class IpAddressBlockingTest extends BrowserTestBase { // Ban a valid IP address. $edit = []; $edit['ip'] = '1.2.3.3'; - $this->drupalPostForm('admin/config/people/ban', $edit, t('Add')); + $this->drupalPostForm('admin/config/people/ban', $edit, 'Add'); $ip = $connection->select('ban_ip', 'bi')->fields('bi', ['iid'])->condition('ip', $edit['ip'])->execute()->fetchField(); $this->assertNotEmpty($ip, 'IP address found in database.'); $this->assertRaw(t('The IP address %ip has been banned.', ['%ip' => $edit['ip']])); @@ -46,30 +46,30 @@ class IpAddressBlockingTest extends BrowserTestBase { // Try to block an IP address that's already blocked. $edit = []; $edit['ip'] = '1.2.3.3'; - $this->drupalPostForm('admin/config/people/ban', $edit, t('Add')); + $this->drupalPostForm('admin/config/people/ban', $edit, 'Add'); $this->assertText('This IP address is already banned.'); // Try to block a reserved IP address. $edit = []; $edit['ip'] = '255.255.255.255'; - $this->drupalPostForm('admin/config/people/ban', $edit, t('Add')); + $this->drupalPostForm('admin/config/people/ban', $edit, 'Add'); $this->assertText('Enter a valid IP address.'); // Try to block a reserved IP address. $edit = []; $edit['ip'] = 'test.example.com'; - $this->drupalPostForm('admin/config/people/ban', $edit, t('Add')); + $this->drupalPostForm('admin/config/people/ban', $edit, 'Add'); $this->assertText('Enter a valid IP address.'); // Submit an empty form. $edit = []; $edit['ip'] = ''; - $this->drupalPostForm('admin/config/people/ban', $edit, t('Add')); + $this->drupalPostForm('admin/config/people/ban', $edit, 'Add'); $this->assertText('Enter a valid IP address.'); // Pass an IP address as a URL parameter and submit it. $submit_ip = '1.2.3.4'; - $this->drupalPostForm('admin/config/people/ban/' . $submit_ip, [], t('Add')); + $this->drupalPostForm('admin/config/people/ban/' . $submit_ip, [], 'Add'); $ip = $connection->select('ban_ip', 'bi')->fields('bi', ['iid'])->condition('ip', $submit_ip)->execute()->fetchField(); $this->assertNotEmpty($ip, 'IP address found in database'); $this->assertRaw(t('The IP address %ip has been banned.', ['%ip' => $submit_ip])); @@ -79,7 +79,7 @@ class IpAddressBlockingTest extends BrowserTestBase { // TODO: On some systems this test fails due to a bug/inconsistency in cURL. // $edit = array(); // $edit['ip'] = \Drupal::request()->getClientIP(); - // $this->drupalPostForm('admin/config/people/ban', $edit, t('Save')); + // $this->drupalPostForm('admin/config/people/ban', $edit, 'Save'); // $this->assertText('You may not ban your own IP address.'); // Test duplicate ip address are not present in the 'blocked_ips' table. |