protected function SocialAuthEntityTest::setUp in Social Auth 3.x
Same name and namespace in other branches
- 8.2 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\KernelCode
protected function setUp() : void {
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();
}