You are here

protected function SimplenewsSynchronizeFieldsTest::setUp in Simplenews 8.2

Same name and namespace in other branches
  1. 8 tests/src/Kernel/SimplenewsSynchronizeFieldsTest.php \Drupal\Tests\simplenews\Kernel\SimplenewsSynchronizeFieldsTest::setUp()
  2. 3.x tests/src/Kernel/SimplenewsSynchronizeFieldsTest.php \Drupal\Tests\simplenews\Kernel\SimplenewsSynchronizeFieldsTest::setUp()

Overrides KernelTestBase::setUp

File

tests/src/Kernel/SimplenewsSynchronizeFieldsTest.php, line 28

Class

SimplenewsSynchronizeFieldsTest
Tests that fields shared by user account and subscribers are synchronized.

Namespace

Drupal\Tests\simplenews\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('simplenews_subscriber');
  $this
    ->installSchema('system', [
    'sequences',
    'sessions',
  ]);
  $this
    ->config('system.mail')
    ->set('interface.default', 'test_mail_collector')
    ->save();
  $this
    ->config('simplenews.settings')
    ->set('subscriber.sync_fields', TRUE)
    ->save();
  ConfigurableLanguage::create([
    'id' => 'fr',
  ])
    ->save();
}