public function CloudFlareAdminSettingsFormTest::testValidCredentials in CloudFlare 8
Test posting an invalid host to the form.
File
- tests/
src/ Functional/ CloudFlareAdminSettingsFormTest.php, line 48
Class
- CloudFlareAdminSettingsFormTest
- Tests \Drupal\purge_ui\Form\CloudFlareAdminSettingsForm.
Namespace
Drupal\Tests\cloudflare\FunctionalCode
public function testValidCredentials() {
$edit = [
'apikey' => '68ow48650j63zfzx1w9jd29cr367u0ezb6a4g',
'email' => 'test@test.com',
];
ComposerDependenciesCheckMock::mockComposerDependenciesMet(TRUE);
$this
->drupalPostForm($this->route, $edit, t('Next'));
$this
->assertSession()
->addressEquals('/admin/config/services/cloudflare/two?js=nojs');
$this
->drupalPostForm(NULL, [], t('Finish'));
$this
->assertSession()
->responseContains('68ow48650j63zfzx1w9jd29cr367u0ezb6a4g');
$this
->assertSession()
->responseContains('test@test.com');
$this
->assertSession()
->responseContains('testdomain.com');
}