public function CloudFlareAdminSettingsFormTest::testInvalidBypassHost in CloudFlare 8
Test posting an invalid host to the form.
File
- tests/
src/ Functional/ CloudFlareAdminSettingsFormTest.php, line 122
Class
- CloudFlareAdminSettingsFormTest
- Tests \Drupal\purge_ui\Form\CloudFlareAdminSettingsForm.
Namespace
Drupal\Tests\cloudflare\FunctionalCode
public function testInvalidBypassHost() {
$edit = [
'apikey' => '68ow48650j63zfzx1w9jd29cr367u0ezb6a4g',
'email' => 'test@test.com',
'client_ip_restore_enabled' => TRUE,
'bypass_host' => 'blah!@#!@',
];
$this
->drupalPostForm($this->route, $edit, t('Next'));
$this
->assertSession()
->pageTextContains('You have entered an invalid host.');
}