public function SocialAuthEntityTest::testEntityCreation 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::testEntityCreation()
Tests entity creation.
File
- tests/
src/ Kernel/ SocialAuthEntityTest.php, line 69
Class
- SocialAuthEntityTest
- Tests social_auth entity.
Namespace
Drupal\Tests\social_auth\KernelCode
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);
}