3 namespace Drupal\metatag_google_plus\Tests;
5 use Drupal\metatag\Tests\MetatagTagsTestBase;
8 * Tests that each of the Metatag Google Plus tags work correctly.
12 class MetatagGooglePlusTagsTest extends MetatagTagsTestBase {
19 'google_plus_description',
22 'google_plus_publisher',
28 private $testNameAttribute = 'itemprop';
33 protected function setUp() {
34 parent::$modules[] = 'metatag_google_plus';
39 * Each of these meta tags has a different tag name vs its internal name.
41 private function getTestTagName($tag_name) {
42 $tag_name = str_replace('google_plus_', 'itemprop:', $tag_name);
43 if ($tag_name == 'itemprop:publisher') {
44 $tag_name = 'publisher';
50 * Implements {tag_name}TestNameAttribute() for 'author'.
52 private function googlePlusAuthorTestOutputXpath() {
53 return "//link[@rel='author']";
57 * Implements {tag_name}TestValueAttribute() for 'author'.
59 private function googlePlusAuthorTestValueAttribute() {
64 * Implements {tag_name}TestNameAttribute() for 'publisher'.
66 private function googlePlusPublisherTestOutputXpath() {
67 return "//link[@rel='publisher']";
71 * Implements {tag_name}TestValueAttribute() for 'publisher'.
73 private function googlePlusPublisherTestValueAttribute() {