protected function HoneypotFormProgrammaticSubmissionTest::setUp in Honeypot 8
Same name and namespace in other branches
- 2.0.x tests/src/Functional/HoneypotFormProgrammaticSubmissionTest.php \Drupal\Tests\honeypot\Functional\HoneypotFormProgrammaticSubmissionTest::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ HoneypotFormProgrammaticSubmissionTest.php, line 32
Class
- HoneypotFormProgrammaticSubmissionTest
- Test programmatic submission of forms protected by Honeypot.
Namespace
Drupal\Tests\honeypot\FunctionalCode
protected function setUp() {
parent::setUp();
// Set up required Honeypot configuration.
$honeypot_config = \Drupal::configFactory()
->getEditable('honeypot.settings');
$honeypot_config
->set('element_name', 'url');
$honeypot_config
->set('time_limit', 5);
$honeypot_config
->set('protect_all_forms', TRUE);
$honeypot_config
->set('log', FALSE);
$honeypot_config
->save();
$this
->drupalCreateUser([], 'robo-user');
}