You are here

protected function MigrateCaptchaPointsTest::assertEntity in CAPTCHA 8

Tests a single captcha point type.

Parameters

string $form_id: The captcha point form id.

string $captcha_type: The expected captcha type for the config.

bool $status: The expected status for a captcha type.

1 call to MigrateCaptchaPointsTest::assertEntity()
MigrateCaptchaPointsTest::testCaptchaPointsMigration in tests/src/Kernel/Migrate/d7/MigrateCaptchaPointsTest.php
Tests that all expected configuration gets migrated.

File

tests/src/Kernel/Migrate/d7/MigrateCaptchaPointsTest.php, line 75

Class

MigrateCaptchaPointsTest
Migrates various configuration objects owned by the captcha module.

Namespace

Drupal\Tests\captcha\Kernel\Migrate\d7

Code

protected function assertEntity(string $form_id, string $captcha_type, $status) {

  /** @var \Drupal\captcha\CaptchaPointInterface $entity */
  $entity = CaptchaPoint::load($form_id);
  $this
    ->assertInstanceOf(CaptchaPointInterface::class, $entity);
  $this
    ->assertSame($form_id, $entity
    ->getFormId());
  $this
    ->assertSame($captcha_type, $entity
    ->getCaptchaType());
  $this
    ->assertSame($status, $entity
    ->status());
}