protected function NotifyTest::setUp in Automatic Updates 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ NotifyTest.php, line 45
Class
- NotifyTest
- Tests notification emails for PSAs.
Namespace
Drupal\Tests\automatic_updates\FunctionalCode
protected function setUp() {
parent::setUp();
// Setup test PSA endpoint.
$end_point = $this
->buildUrl(Url::fromRoute('test_automatic_updates.json_test_controller'));
$this
->config('automatic_updates.settings')
->set('psa_endpoint', $end_point)
->save();
// Setup a default destination email address.
$this
->config('update.settings')
->set('notification.emails', [
'admin@example.com',
])
->save();
$this->user = $this
->drupalCreateUser([
'administer site configuration',
'access administration pages',
]);
$this
->drupalLogin($this->user);
}