You are here

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

Asserts an Eck bundle config entity.

Parameters

array $bundle: An array of eck bundle information.

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

File

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

Class

MigrateEckTestBase
Base class for ECK migration tests.

Namespace

Drupal\Tests\eck\Kernel\Migrate\d7

Code

public function assertEckBundle(array $bundle) {
  $entity = eckEntityBundle::load($bundle['type']);
  $this
    ->assertInstanceOf(eckEntityBundle::class, $entity);
  $this
    ->assertSame($bundle['name'], $entity->name);
  $this
    ->assertSame($bundle['description'], $entity->description);
  $this
    ->assertSame($bundle['langcode'], $entity
    ->language()
    ->getId());
}