function AdminMetaTagTest::testMetaTag
Same name in other branches
- 9 core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php \Drupal\Tests\system\Functional\System\AdminMetaTagTest::testMetaTag()
- 8.9.x core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php \Drupal\Tests\system\Functional\System\AdminMetaTagTest::testMetaTag()
- 10 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 24
Class
- AdminMetaTagTest
- Confirm that the fingerprinting meta tag appears as expected.
Namespace
Drupal\Tests\system\Functional\SystemCode
public function testMetaTag() : void {
[
$version,
] = explode('.', \Drupal::VERSION);
$string = '<meta name="Generator" content="Drupal ' . $version . ' (https://www.drupal.org)" />';
$this->drupalGet('node');
$this->assertSession()
->responseContains($string);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.