protected function MigrateContactCategoryTest::assertEntity in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/contact/src/Tests/Migrate/MigrateContactCategoryTest.php \Drupal\contact\Tests\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.
integer $expected_weight: The contact form's expected weight.
1 call to MigrateContactCategoryTest::assertEntity()
- MigrateContactCategoryTest::testContactCategory in core/
modules/ contact/ src/ Tests/ Migrate/ MigrateContactCategoryTest.php - The Drupal 6 and 7 contact categories to Drupal 8 migration.
File
- core/
modules/ contact/ src/ Tests/ Migrate/ MigrateContactCategoryTest.php, line 50 - Contains \Drupal\contact\Tests\Migrate\MigrateContactCategoryTest.
Class
- MigrateContactCategoryTest
- Migrate contact categories to contact.form.*.yml.
Namespace
Drupal\contact\Tests\MigrateCode
protected function assertEntity($id, $expected_label, array $expected_recipients, $expected_reply, $expected_weight) {
/** @var \Drupal\contact\ContactFormInterface $entity */
$entity = ContactForm::load($id);
$this
->assertTrue($entity instanceof ContactFormInterface);
$this
->assertIdentical($expected_label, $entity
->label());
$this
->assertIdentical($expected_recipients, $entity
->getRecipients());
$this
->assertIdentical($expected_reply, $entity
->getReply());
$this
->assertIdentical($expected_weight, $entity
->getWeight());
}