You are here

protected function CaptchaPersistenceTest::assertPreservedCsid in CAPTCHA 8

Check if Captcha sid present in form.

Parameters

string $captcha_sid_initial: Captcha SID token.

4 calls to CaptchaPersistenceTest::assertPreservedCsid()
CaptchaPersistenceTest::testPersistenceAlways in tests/src/Functional/CaptchaPersistenceTest.php
Test persistence always.
CaptchaPersistenceTest::testPersistenceOnlyOnce in tests/src/Functional/CaptchaPersistenceTest.php
Test Persistence "Only once".
CaptchaPersistenceTest::testPersistencePerFormInstance in tests/src/Functional/CaptchaPersistenceTest.php
Test persistence per form instance.
CaptchaPersistenceTest::testPersistencePerFormType in tests/src/Functional/CaptchaPersistenceTest.php
Test Persistence per form type.

File

tests/src/Functional/CaptchaPersistenceTest.php, line 50

Class

CaptchaPersistenceTest
Tests CAPTCHA Persistence.

Namespace

Drupal\Tests\captcha\Functional

Code

protected function assertPreservedCsid($captcha_sid_initial) {
  $captcha_sid = $this
    ->getCaptchaSidFromForm();
  $this
    ->assertEquals($captcha_sid_initial, $captcha_sid, "CAPTCHA session ID should be preserved (expected: {$captcha_sid_initial}, found: {$captcha_sid}).");
}