You are here

public function AdminMetaTagTest::testMetaTag in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php \Drupal\Tests\system\Functional\System\AdminMetaTagTest::testMetaTag()
  2. 9 core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php \Drupal\Tests\system\Functional\System\AdminMetaTagTest::testMetaTag()

Verify that the meta tag HTML is generated correctly.

File

core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php, line 22

Class

AdminMetaTagTest
Confirm that the fingerprinting meta tag appears as expected.

Namespace

Drupal\Tests\system\Functional\System

Code

public function testMetaTag() {
  [
    $version,
  ] = explode('.', \Drupal::VERSION);
  $string = '<meta name="Generator" content="Drupal ' . $version . ' (https://www.drupal.org)" />';
  $this
    ->drupalGet('node');
  $this
    ->assertSession()
    ->responseContains($string);
}