3 namespace Drupal\metatag_app_links\Tests;
5 use Drupal\simpletest\WebTestBase;
6 use Drupal\metatag\Tests\MetatagTagsTestBase;
9 * Tests that each of the App Links tags work correctly.
13 class MetatagAppLinksTagsTest extends MetatagTagsTestBase {
19 'al_android_app_name',
24 'al_ios_app_store_id',
27 'al_ipad_app_store_id',
30 'al_iphone_app_store_id',
32 'al_web_should_fallback',
35 'al_windows_app_name',
36 'al_windows_phone_app_id',
37 'al_windows_phone_app_name',
38 'al_windows_phone_url',
39 'al_windows_universal_app_id',
40 'al_windows_universal_app_name',
41 'al_windows_universal_url',
48 public $test_name_attribute = 'property';
53 protected function setUp() {
54 parent::$modules[] = 'metatag_app_links';
59 * Each of these meta tags has a different tag name vs its internal name.
61 public function getTestTagName($tag_name) {
62 $tag_name = str_replace('al_android_', 'al:android:', $tag_name);
63 $tag_name = str_replace('al_ios_', 'al:ios:', $tag_name);
64 $tag_name = str_replace('al_ipad_', 'al:ipad:', $tag_name);
65 $tag_name = str_replace('al_iphone_', 'al:iphone:', $tag_name);
66 $tag_name = str_replace('al_web_', 'al:web:', $tag_name);
67 // Run the Windows subtype replacements first so that the generic Windows
68 // one can still work.
69 $tag_name = str_replace('al_windows_phone_', 'al:windows_phone:', $tag_name);
70 $tag_name = str_replace('al_windows_universal_', 'al:windows_universal:', $tag_name);
71 $tag_name = str_replace('al_windows_', 'al:windows:', $tag_name);