You are here

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

Tests entity creation.

File

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

Class

SocialAuthEntityTest
Tests social_auth entity.

Namespace

Drupal\Tests\social_auth\Kernel

Code

public function testEntityCreation() {
  $entity1 = SocialAuth::create($this->values);
  $entity2 = $this->entityStorage
    ->create($this->values);
  $values1 = $entity1
    ->toArray();
  $values2 = $entity2
    ->toArray();
  unset($values1['uuid'], $values2['uuid'], $values1['token'], $values2['token']);
  self::assertEquals($values1, $values2);
}