public function CyclicAjaxTest::setUp in Automated Logout 8
Throws
\Drupal\Core\Entity\EntityStorageException
Overrides BrowserTestBase::setUp
File
- tests/
src/ FunctionalJavascript/ CyclicAjaxTest.php, line 49
Class
- CyclicAjaxTest
- Test that checks if cyclic ajax request do not prevent logout.
Namespace
Drupal\Tests\autologout\FunctionalJavascriptCode
public function setUp() {
parent::setUp();
// Create and log in our privileged user.
$this->privilegedUser = $this
->drupalCreateUser([
'administer site configuration',
'access administration pages',
'administer autologout',
'change own logout threshold',
'view the administration theme',
]);
$this->baseUrl = Url::fromRoute('<front>', [], [
'absolute' => TRUE,
])
->toString();
$this->configFactory = \Drupal::service('config.factory');
// For the purposes of the test, set the timeout periods to 10 seconds.
$this->configFactory
->getEditable('autologout.settings')
->set('timeout', 10)
->set('padding', 5)
->save();
}