3 namespace Drupal\metatag_app_links\Tests;
5 use Drupal\metatag\Tests\MetatagTagsTestBase;
8 * Tests that each of the App Links tags work correctly.
12 class MetatagAppLinksTagsTest extends MetatagTagsTestBase {
18 'al_android_app_name',
23 'al_ios_app_store_id',
26 'al_ipad_app_store_id',
29 'al_iphone_app_store_id',
31 'al_web_should_fallback',
34 'al_windows_app_name',
35 'al_windows_phone_app_id',
36 'al_windows_phone_app_name',
37 'al_windows_phone_url',
38 'al_windows_universal_app_id',
39 'al_windows_universal_app_name',
40 'al_windows_universal_url',
47 private $testNameAttribute = 'property';
52 protected function setUp() {
53 parent::$modules[] = 'metatag_app_links';
58 * Each of these meta tags has a different tag name vs its internal name.
60 private function getTestTagName($tag_name) {
61 $tag_name = str_replace('al_android_', 'al:android:', $tag_name);
62 $tag_name = str_replace('al_ios_', 'al:ios:', $tag_name);
63 $tag_name = str_replace('al_ipad_', 'al:ipad:', $tag_name);
64 $tag_name = str_replace('al_iphone_', 'al:iphone:', $tag_name);
65 $tag_name = str_replace('al_web_', 'al:web:', $tag_name);
66 // Run the Windows subtype replacements first so that the generic Windows
67 // one can still work.
68 $tag_name = str_replace('al_windows_phone_', 'al:windows_phone:', $tag_name);
69 $tag_name = str_replace('al_windows_universal_', 'al:windows_universal:', $tag_name);
70 $tag_name = str_replace('al_windows_', 'al:windows:', $tag_name);