You are here

protected function MetatagTagsTest::getTestTagName in Metatag 8

Each of these meta tags has a different tag name vs its internal name.

Overrides MetatagTagsTestBase::getTestTagName

File

tests/src/Functional/MetatagTagsTest.php, line 51

Class

MetatagTagsTest
Tests that each of the Metatag base tags work correctly.

Namespace

Drupal\Tests\metatag\Functional

Code

protected function getTestTagName($tag_name) {
  if ($tag_name == 'geo_placename') {
    $tag_name = 'geo.placename';
  }
  elseif ($tag_name == 'geo_position') {
    $tag_name = 'geo.position';
  }
  elseif ($tag_name == 'geo_region') {
    $tag_name = 'geo.region';
  }
  elseif ($tag_name == 'content_language') {
    $tag_name = 'content-language';
  }
  elseif ($tag_name == 'original_source') {
    $tag_name = 'original-source';
  }
  elseif ($tag_name == 'set_cookie') {
    $tag_name = 'set-cookie';
  }
  elseif ($tag_name == 'cache_control') {
    $tag_name = 'cache-control';
  }
  elseif ($tag_name == 'revisit_after') {
    $tag_name = 'revisit-after';
  }
  return $tag_name;
}