protected function MigrateContactCategoryTest::assertEntity in Drupal 9
Same name and namespace in other branches
- 8 core/modules/contact/tests/src/Kernel/Migrate/MigrateContactCategoryTest.php \Drupal\Tests\contact\Kernel\Migrate\MigrateContactCategoryTest::assertEntity()
Performs various assertions on a single contact form entity.
Parameters
string $id: The contact form ID.
string $expected_label: The expected label.
string[] $expected_recipients: The recipient e-mail addresses the form should have.
string $expected_reply: The expected reply message.
int $expected_weight: The contact form's expected weight.
1 call to MigrateContactCategoryTest::assertEntity()
- MigrateContactCategoryTest::testContactCategory in core/
modules/ contact/ tests/ src/ Kernel/ Migrate/ MigrateContactCategoryTest.php - The Drupal 6 and 7 contact categories to Drupal 8 migration.
File
- core/
modules/ contact/ tests/ src/ Kernel/ Migrate/ MigrateContactCategoryTest.php, line 45
Class
- MigrateContactCategoryTest
- Migrate contact categories to contact.form.*.yml.
Namespace
Drupal\Tests\contact\Kernel\MigrateCode
protected function assertEntity($id, $expected_label, array $expected_recipients, $expected_reply, $expected_weight) {
/** @var \Drupal\contact\ContactFormInterface $entity */
$entity = ContactForm::load($id);
$this
->assertInstanceOf(ContactFormInterface::class, $entity);
$this
->assertSame($expected_label, $entity
->label());
$this
->assertSame($expected_recipients, $entity
->getRecipients());
$this
->assertSame($expected_reply, $entity
->getReply());
$this
->assertSame($expected_weight, $entity
->getWeight());
}