You are here

protected function SocialAuthEntityTest::setUp in Social Auth 8.2

Same name and namespace in other branches
  1. 3.x tests/src/Kernel/SocialAuthEntityTest.php \Drupal\Tests\social_auth\Kernel\SocialAuthEntityTest::setUp()

Overrides EntityKernelTestBase::setUp

File

tests/src/Kernel/SocialAuthEntityTest.php, line 46

Class

SocialAuthEntityTest
Tests social_auth entity.

Namespace

Drupal\Tests\social_auth\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('social_auth');
  $this->entityStorage = $this->entityTypeManager
    ->getStorage('social_auth');
  $user = $this
    ->drupalCreateUser();
  $this->values = [
    'user_id' => $user
      ->id(),
    'plugin_id' => 'social_auth_provider_test',
    'provider_user_id' => 'provider_id_test',
    'additional_data' => [
      'foo' => 'bar',
    ],
    'token' => 'token_test',
  ];
  $this->entity = $this->entityStorage
    ->create($this->values);
  $this->entity
    ->save();
}