You are here

public function SocialAuthEntityTest::testAdditionalData 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::testAdditionalData()

Tests getter/setter for additional_data field.

File

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

Class

SocialAuthEntityTest
Tests social_auth entity.

Namespace

Drupal\Tests\social_auth\Kernel

Code

public function testAdditionalData() {
  self::assertEquals($this->values['additional_data'], $this->entity
    ->getAdditionalData());
  $new_value = [];
  $this->entity
    ->setAdditionalData($new_value);
  $this->entity
    ->save();
  self::assertEquals($new_value, $this->entity
    ->getAdditionalData());
}