function MigrateActionsTest::assertEntity

Same name in this branch
  1. 8.9.x core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php \Drupal\Tests\action\Kernel\Migrate\d7\MigrateActionsTest::assertEntity()
Same name in other branches
  1. 9 core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php \Drupal\Tests\system\Kernel\Migrate\d6\MigrateActionsTest::assertEntity()
  2. 9 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateActionsTest::assertEntity()
  3. 10 core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php \Drupal\Tests\system\Kernel\Migrate\d6\MigrateActionsTest::assertEntity()
  4. 10 core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateActionsTest::assertEntity()
  5. 11.x core/modules/system/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php \Drupal\Tests\system\Kernel\Migrate\d6\MigrateActionsTest::assertEntity()
  6. 11.x core/modules/system/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php \Drupal\Tests\system\Kernel\Migrate\d7\MigrateActionsTest::assertEntity()
  7. 10 core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php \Drupal\Tests\action\Kernel\Migrate\d6\MigrateActionsTest::assertEntity()
  8. 10 core/modules/action/tests/src/Kernel/Migrate/d7/MigrateActionsTest.php \Drupal\Tests\action\Kernel\Migrate\d7\MigrateActionsTest::assertEntity()

Asserts various aspects of an Action entity.

Parameters

string $id: The expected Action ID.

string $label: The expected Action label.

string $type: The expected Action type.

array $configuration: The expected Action configuration.

1 call to MigrateActionsTest::assertEntity()
MigrateActionsTest::testActions in core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php
Test Drupal 6 action migration to Drupal 8.

File

core/modules/action/tests/src/Kernel/Migrate/d6/MigrateActionsTest.php, line 61

Class

MigrateActionsTest
Tests migration of action items.

Namespace

Drupal\Tests\action\Kernel\Migrate\d6

Code

protected function assertEntity($id, $label, $type, $configuration) {
    $action = Action::load($id);
    $this->assertInstanceOf(Action::class, $action);
    
    /** @var \Drupal\system\Entity\Action $action */
    $this->assertIdentical($id, $action->id());
    $this->assertIdentical($label, $action->label());
    $this->assertIdentical($type, $action->getType());
    $this->assertIdentical($configuration, $action->get('configuration'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.