public function CloudFlareAdminSettingsInvalidFormTest::testUpperCaseInvalidCredentials in CloudFlare 8
Test posting an invalid host to the form.
File
- tests/
src/ Functional/ CloudFlareAdminSettingsInvalidFormTest.php, line 100
Class
- CloudFlareAdminSettingsInvalidFormTest
- Tests \Drupal\purge_ui\Form\CloudFlareAdminSettingsForm.
Namespace
Drupal\Tests\cloudflare\FunctionalCode
public function testUpperCaseInvalidCredentials() {
ZoneMock::mockAssertValidCredentials(TRUE);
ComposerDependenciesCheckMock::mockComposerDependenciesMet(TRUE);
$edit = [
'apikey' => 'fDK5M9sf51x6CEAspHSUYM4vt40m5XC2T6i1K',
'email' => 'test@test.com',
];
$this
->drupalLogin($this->adminUser);
$this
->drupalPostForm($this->route, $edit, t('Next'));
$this
->assertSession()
->pageTextContains('Invalid Api Key: Key can only contain lowercase or numerical characters.');
}