AdminMetaTagTest.php

Same filename and directory in other branches
  1. 9 core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php
  2. 10 core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php
  3. 11.x core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php

Namespace

Drupal\Tests\system\Functional\System

File

core/modules/system/tests/src/Functional/System/AdminMetaTagTest.php

View source
<?php

namespace Drupal\Tests\system\Functional\System;

use Drupal\Tests\BrowserTestBase;

/**
 * Confirm that the fingerprinting meta tag appears as expected.
 *
 * @group system
 */
class AdminMetaTagTest extends BrowserTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected $defaultTheme = 'stark';
    
    /**
     * Verify that the meta tag HTML is generated correctly.
     */
    public function testMetaTag() {
        list($version, ) = explode('.', \Drupal::VERSION);
        $string = '<meta name="Generator" content="Drupal ' . $version . ' (https://www.drupal.org)" />';
        $this->drupalGet('node');
        $this->assertRaw($string, 'Fingerprinting meta tag generated correctly.', 'System');
    }

}

Classes

Title Deprecated Summary
AdminMetaTagTest Confirm that the fingerprinting meta tag appears as expected.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.