You are here

public function MigrateEckTestBase::assertEckEntityType in Entity Construction Kit (ECK) 8

Asserts an Eck config entity type.

Parameters

array $type: An array of eck type information.

  • id: The entity type id.
  • label: The entity label.
  • langcode: The entity language code.
1 call to MigrateEckTestBase::assertEckEntityType()
MigrateEckTypeTest::testEckEntityType in tests/src/Kernel/Migrate/d7/MigrateEckTypeTest.php
Tests migrating Eck entity types.

File

tests/src/Kernel/Migrate/d7/MigrateEckTestBase.php, line 59

Class

MigrateEckTestBase
Base class for ECK migration tests.

Namespace

Drupal\Tests\eck\Kernel\Migrate\d7

Code

public function assertEckEntityType(array $type) {
  $entity = eckEntityType::load($type['id']);
  $this
    ->assertInstanceOf(eckEntityType::class, $entity);
  $this
    ->assertSame($type['label'], $entity
    ->label());
  $this
    ->assertSame($type['langcode'], $entity
    ->language()
    ->getId());
}