public function LogTest::assertLog in Commerce Migrate 3.0.x
Same name and namespace in other branches
- 8.2 modules/commerce/tests/src/Kernel/Migrate/commerce1/LogTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\LogTest::assertLog()
- 3.1.x modules/commerce/tests/src/Kernel/Migrate/commerce1/LogTest.php \Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1\LogTest::assertLog()
Asserts an Log entity.
Parameters
array $log: An array of log information.
- id: The log id.
- category_id: The category id.
- label: The label.
- source_entity_id: The id of the source entity
- created: The time the log entry was saved.
- template_id: The template ID.
1 call to LogTest::assertLog()
- LogTest::testMessage in modules/
commerce/ tests/ src/ Kernel/ Migrate/ commerce1/ LogTest.php - Test message migration from Drupal 7 to Drupal 8 Commerce Log.
File
- modules/
commerce/ tests/ src/ Kernel/ Migrate/ commerce1/ LogTest.php, line 62
Class
- LogTest
- Tests message to log migration.
Namespace
Drupal\Tests\commerce_migrate_commerce\Kernel\Migrate\commerce1Code
public function assertLog(array $log) {
$log_instance = Log::load($log['id']);
$this
->assertInstanceOf(Log::class, $log_instance);
$this
->assertSame($log['category_id'], $log_instance
->getCategoryId());
$this
->assertSame($log['label'], $log_instance
->label());
$this
->assertSame($log['source_entity_id'], $log_instance
->getSourceEntityId());
$this
->assertSame($log['created'], $log_instance
->getCreatedTime());
$this
->assertSame($log['template_id'], $log_instance
->getTemplateId());
}