public function LoginSecurityTestBase::setUp in Login Security 2.x
Overrides BrowserTestBase::setUp
3 calls to LoginSecurityTestBase::setUp()
- LoginSecurityEmailTest::setUp in tests/
src/ Functional/ LoginSecurityEmailTest.php - LoginSecurityInterfaceTest::setUp in tests/
src/ Functional/ LoginSecurityInterfaceTest.php - LoginSecurityUserBlockingTest::setUp in tests/
src/ Functional/ LoginSecurityUserBlockingTest.php
3 methods override LoginSecurityTestBase::setUp()
- LoginSecurityEmailTest::setUp in tests/
src/ Functional/ LoginSecurityEmailTest.php - LoginSecurityInterfaceTest::setUp in tests/
src/ Functional/ LoginSecurityInterfaceTest.php - LoginSecurityUserBlockingTest::setUp in tests/
src/ Functional/ LoginSecurityUserBlockingTest.php
File
- tests/
src/ Functional/ LoginSecurityTestBase.php, line 30
Class
- LoginSecurityTestBase
- Helper test class with some added functions for testing.
Namespace
Drupal\Tests\login_security\FunctionalCode
public function setUp() {
parent::setUp();
// Ensure these tables have no entries.
\Drupal::database()
->query('TRUNCATE TABLE {login_security_track}');
\Drupal::database()
->query('TRUNCATE TABLE {ban_ip}');
// Set time tracking window to 1 hour.
\Drupal::configFactory()
->getEditable('login_security.settings')
->set('track_time', 1)
->save();
}