You are here

protected function TestBase::assertWarningMessage in Double Field 4.x

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/TestBase.php \Drupal\Tests\double_field\Functional\TestBase::assertWarningMessage()

Passes if a given warning message was found on the page.

1 call to TestBase::assertWarningMessage()
FieldTypeTest::testFieldStorageSettingsForm in tests/src/Functional/FieldTypeTest.php
Test field storage settings form.

File

tests/src/Functional/TestBase.php, line 284

Class

TestBase
Tests the creation of text fields.

Namespace

Drupal\Tests\double_field\Functional

Code

protected function assertWarningMessage(string $message) : void {
  $messages = $this
    ->getMessages('warning');
  self::assertTrue(in_array($message, $messages), 'Warning message was found.');
}