Loading CHANGELOG.txt +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ Metatag 8.x-1.x-dev, xxxx-xx-xx #3124205 by DamienMcKenna, Berdir: Remove test_dependencies from metatag.info.yml. #3123578 by DamienMcKenna, Berdir: Add NodeJsonOutput test back again. #3124042 by Neslee Canil Pinto: Follow-up with more changes. Metatag 8.x-1.12, 2020-03-30 Loading tests/src/Functional/MetatagAdminTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -333,7 +333,7 @@ class MetatagAdminTest extends BrowserTestBase { 'description' => 'Article description override', ]; $this->drupalPostForm(NULL, $values, 'Save'); $this->assertText(strip_tags(t('Created the %label Metatag defaults.', ['%label' => 'Content: Article']))); $this->assertText(strip_tags($this->t('Created the %label Metatag defaults.', ['%label' => 'Content: Article']))); // Confirm the fields load properly on the node/add/article page. $node = $this->drupalCreateNode([ Loading @@ -351,7 +351,7 @@ class MetatagAdminTest extends BrowserTestBase { $this->drupalGet('admin/config/search/metatag/node__article/delete'); $this->assertResponse(200); $this->drupalPostForm(NULL, [], 'Delete'); $this->assertText(t('Deleted @label defaults.', ['@label' => 'Content: Article'])); $this->assertText($this->t('Deleted @label defaults.', ['@label' => 'Content: Article'])); } /** Loading Loading @@ -385,9 +385,9 @@ class MetatagAdminTest extends BrowserTestBase { ]; $this->drupalPostForm(NULL, $edit, $this->t('Save and continue')); $this->drupalPostForm(NULL, [], $this->t('Save field settings')); $this->assertText(strip_tags(t('Updated field %label field settings.', ['%label' => 'Meta tags']))); $this->assertText(strip_tags($this->t('Updated field %label field settings.', ['%label' => 'Meta tags']))); $this->drupalPostForm(NULL, [], $this->t('Save settings')); $this->assertText(strip_tags(t('Saved %label configuration.', ['%label' => 'Meta tags']))); $this->assertText(strip_tags($this->t('Saved %label configuration.', ['%label' => 'Meta tags']))); // Try creating an article, confirm the fields are present. This should be // the node default values that are shown. Loading @@ -405,7 +405,7 @@ class MetatagAdminTest extends BrowserTestBase { 'description' => 'Article description override', ]; $this->drupalPostForm(NULL, $values, 'Save'); $this->assertText(strip_tags(t('Created the %label Metatag defaults.', ['%label' => 'Content: Article']))); $this->assertText(strip_tags($this->t('Created the %label Metatag defaults.', ['%label' => 'Content: Article']))); // Try creating an article, this time with the overridden defaults. $this->drupalGet('node/add/article'); Loading tests/src/Functional/MetatagConfigTranslationTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ class MetatagConfigTranslationTest extends BrowserTestBase { 'predefined_langcode' => 'fr', ]; $this->drupalPostForm(NULL, $edit, $this->t('Add language')); $this->assertRaw(t( $this->assertRaw($this->t( 'The language %language has been created and can now be used.', ['%language' => $this->t('French')] )); Loading @@ -91,13 +91,13 @@ class MetatagConfigTranslationTest extends BrowserTestBase { // Ensure the config shows on the admin form. $this->drupalGet('admin/config/regional/config-translation'); $this->assertResponse(200); $this->assertText(t('Metatag defaults')); $this->assertText($this->t('Metatag defaults')); // Load the main metatag_defaults config translation page. $this->drupalGet('admin/config/regional/config-translation/metatag_defaults'); $this->assertResponse(200); // @todo Update this to confirm the H1 is loaded. $this->assertRaw(t('Metatag defaults')); $this->assertRaw($this->t('Metatag defaults')); // Load all of the Metatag defaults. $defaults = \Drupal::configFactory()->listAll('metatag.metatag_defaults'); Loading Loading @@ -137,7 +137,7 @@ class MetatagConfigTranslationTest extends BrowserTestBase { ]; $this->drupalPostForm(NULL, $edit, $this->t('Save')); $this->assertResponse(200); $this->assertText(t('Saved the Global Metatag defaults.')); $this->assertText($this->t('Saved the Global Metatag defaults.')); // Confirm the config has languages available to translate into. $this->drupalGet('admin/config/search/metatag/global/translate'); Loading @@ -162,7 +162,7 @@ class MetatagConfigTranslationTest extends BrowserTestBase { ]; $this->drupalPostForm(NULL, $edit, $this->t('Save translation')); $this->assertResponse(200); $this->assertText(t('Successfully saved French translation')); $this->assertText($this->t('Successfully saved French translation')); } } tests/src/Functional/MetatagFieldTestBase.php +4 −4 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ abstract class MetatagFieldTestBase extends BrowserTestBase { 'metatag_test_tag' => 'Global description', ]; $this->drupalPostForm(NULL, $global_values, 'Save'); $this->assertText(strip_tags(t('Saved the %label Metatag defaults.', ['%label' => $this->t('Global')]))); $this->assertText(strip_tags($this->t('Saved the %label Metatag defaults.', ['%label' => $this->t('Global')]))); // Set an entity default. $this->drupalGet('admin/config/search/metatag/' . $this->entityType); Loading @@ -251,7 +251,7 @@ abstract class MetatagFieldTestBase extends BrowserTestBase { 'metatag_test_tag' => 'Entity description', ]; $this->drupalPostForm(NULL, $entity_values, 'Save'); $this->assertText(strip_tags(t('Saved the %label Metatag defaults.', ['%label' => $this->t($this->entityLabel)]))); $this->assertText(strip_tags($this->t('Saved the %label Metatag defaults.', ['%label' => $this->t($this->entityLabel)]))); // Add the field to this entity type. $this->addField(); Loading Loading @@ -322,7 +322,7 @@ abstract class MetatagFieldTestBase extends BrowserTestBase { 'metatag_test_tag' => 'Global description', ]; $this->drupalPostForm(NULL, $global_values, 'Save'); $this->assertText(strip_tags(t('Saved the %label Metatag defaults.', ['%label' => $this->t('Global')]))); $this->assertText(strip_tags($this->t('Saved the %label Metatag defaults.', ['%label' => $this->t('Global')]))); // Set an entity default if it's supported by the entity type. if ($this->entitySupportsDefaults) { Loading @@ -332,7 +332,7 @@ abstract class MetatagFieldTestBase extends BrowserTestBase { 'metatag_test_tag' => 'Entity description', ]; $this->drupalPostForm(NULL, $entity_values, 'Save'); $this->assertText(strip_tags(t('Saved the %label Metatag defaults.', ['%label' => $this->t($this->entityLabel)]))); $this->assertText(strip_tags($this->t('Saved the %label Metatag defaults.', ['%label' => $this->t($this->entityLabel)]))); } // Load the entity form for this entity type. Loading tests/src/Functional/MetatagForumTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class MetatagForumTest extends BrowserTestBase { $save_label = (floatval(\Drupal::VERSION) <= 8.3) ? $this->t('Save and publish') : $this->t('Save'); $this->drupalPostForm(NULL, $edit, $save_label); $this->assertResponse(200); $this->assertText(t('@type @title has been created.', ['@type' => $this->t('Forum topic'), '@title' => 'Testing forums'])); $this->assertText($this->t('@type @title has been created.', ['@type' => $this->t('Forum topic'), '@title' => 'Testing forums'])); } } Loading
CHANGELOG.txt +1 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ Metatag 8.x-1.x-dev, xxxx-xx-xx #3124205 by DamienMcKenna, Berdir: Remove test_dependencies from metatag.info.yml. #3123578 by DamienMcKenna, Berdir: Add NodeJsonOutput test back again. #3124042 by Neslee Canil Pinto: Follow-up with more changes. Metatag 8.x-1.12, 2020-03-30 Loading
tests/src/Functional/MetatagAdminTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -333,7 +333,7 @@ class MetatagAdminTest extends BrowserTestBase { 'description' => 'Article description override', ]; $this->drupalPostForm(NULL, $values, 'Save'); $this->assertText(strip_tags(t('Created the %label Metatag defaults.', ['%label' => 'Content: Article']))); $this->assertText(strip_tags($this->t('Created the %label Metatag defaults.', ['%label' => 'Content: Article']))); // Confirm the fields load properly on the node/add/article page. $node = $this->drupalCreateNode([ Loading @@ -351,7 +351,7 @@ class MetatagAdminTest extends BrowserTestBase { $this->drupalGet('admin/config/search/metatag/node__article/delete'); $this->assertResponse(200); $this->drupalPostForm(NULL, [], 'Delete'); $this->assertText(t('Deleted @label defaults.', ['@label' => 'Content: Article'])); $this->assertText($this->t('Deleted @label defaults.', ['@label' => 'Content: Article'])); } /** Loading Loading @@ -385,9 +385,9 @@ class MetatagAdminTest extends BrowserTestBase { ]; $this->drupalPostForm(NULL, $edit, $this->t('Save and continue')); $this->drupalPostForm(NULL, [], $this->t('Save field settings')); $this->assertText(strip_tags(t('Updated field %label field settings.', ['%label' => 'Meta tags']))); $this->assertText(strip_tags($this->t('Updated field %label field settings.', ['%label' => 'Meta tags']))); $this->drupalPostForm(NULL, [], $this->t('Save settings')); $this->assertText(strip_tags(t('Saved %label configuration.', ['%label' => 'Meta tags']))); $this->assertText(strip_tags($this->t('Saved %label configuration.', ['%label' => 'Meta tags']))); // Try creating an article, confirm the fields are present. This should be // the node default values that are shown. Loading @@ -405,7 +405,7 @@ class MetatagAdminTest extends BrowserTestBase { 'description' => 'Article description override', ]; $this->drupalPostForm(NULL, $values, 'Save'); $this->assertText(strip_tags(t('Created the %label Metatag defaults.', ['%label' => 'Content: Article']))); $this->assertText(strip_tags($this->t('Created the %label Metatag defaults.', ['%label' => 'Content: Article']))); // Try creating an article, this time with the overridden defaults. $this->drupalGet('node/add/article'); Loading
tests/src/Functional/MetatagConfigTranslationTest.php +5 −5 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ class MetatagConfigTranslationTest extends BrowserTestBase { 'predefined_langcode' => 'fr', ]; $this->drupalPostForm(NULL, $edit, $this->t('Add language')); $this->assertRaw(t( $this->assertRaw($this->t( 'The language %language has been created and can now be used.', ['%language' => $this->t('French')] )); Loading @@ -91,13 +91,13 @@ class MetatagConfigTranslationTest extends BrowserTestBase { // Ensure the config shows on the admin form. $this->drupalGet('admin/config/regional/config-translation'); $this->assertResponse(200); $this->assertText(t('Metatag defaults')); $this->assertText($this->t('Metatag defaults')); // Load the main metatag_defaults config translation page. $this->drupalGet('admin/config/regional/config-translation/metatag_defaults'); $this->assertResponse(200); // @todo Update this to confirm the H1 is loaded. $this->assertRaw(t('Metatag defaults')); $this->assertRaw($this->t('Metatag defaults')); // Load all of the Metatag defaults. $defaults = \Drupal::configFactory()->listAll('metatag.metatag_defaults'); Loading Loading @@ -137,7 +137,7 @@ class MetatagConfigTranslationTest extends BrowserTestBase { ]; $this->drupalPostForm(NULL, $edit, $this->t('Save')); $this->assertResponse(200); $this->assertText(t('Saved the Global Metatag defaults.')); $this->assertText($this->t('Saved the Global Metatag defaults.')); // Confirm the config has languages available to translate into. $this->drupalGet('admin/config/search/metatag/global/translate'); Loading @@ -162,7 +162,7 @@ class MetatagConfigTranslationTest extends BrowserTestBase { ]; $this->drupalPostForm(NULL, $edit, $this->t('Save translation')); $this->assertResponse(200); $this->assertText(t('Successfully saved French translation')); $this->assertText($this->t('Successfully saved French translation')); } }
tests/src/Functional/MetatagFieldTestBase.php +4 −4 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ abstract class MetatagFieldTestBase extends BrowserTestBase { 'metatag_test_tag' => 'Global description', ]; $this->drupalPostForm(NULL, $global_values, 'Save'); $this->assertText(strip_tags(t('Saved the %label Metatag defaults.', ['%label' => $this->t('Global')]))); $this->assertText(strip_tags($this->t('Saved the %label Metatag defaults.', ['%label' => $this->t('Global')]))); // Set an entity default. $this->drupalGet('admin/config/search/metatag/' . $this->entityType); Loading @@ -251,7 +251,7 @@ abstract class MetatagFieldTestBase extends BrowserTestBase { 'metatag_test_tag' => 'Entity description', ]; $this->drupalPostForm(NULL, $entity_values, 'Save'); $this->assertText(strip_tags(t('Saved the %label Metatag defaults.', ['%label' => $this->t($this->entityLabel)]))); $this->assertText(strip_tags($this->t('Saved the %label Metatag defaults.', ['%label' => $this->t($this->entityLabel)]))); // Add the field to this entity type. $this->addField(); Loading Loading @@ -322,7 +322,7 @@ abstract class MetatagFieldTestBase extends BrowserTestBase { 'metatag_test_tag' => 'Global description', ]; $this->drupalPostForm(NULL, $global_values, 'Save'); $this->assertText(strip_tags(t('Saved the %label Metatag defaults.', ['%label' => $this->t('Global')]))); $this->assertText(strip_tags($this->t('Saved the %label Metatag defaults.', ['%label' => $this->t('Global')]))); // Set an entity default if it's supported by the entity type. if ($this->entitySupportsDefaults) { Loading @@ -332,7 +332,7 @@ abstract class MetatagFieldTestBase extends BrowserTestBase { 'metatag_test_tag' => 'Entity description', ]; $this->drupalPostForm(NULL, $entity_values, 'Save'); $this->assertText(strip_tags(t('Saved the %label Metatag defaults.', ['%label' => $this->t($this->entityLabel)]))); $this->assertText(strip_tags($this->t('Saved the %label Metatag defaults.', ['%label' => $this->t($this->entityLabel)]))); } // Load the entity form for this entity type. Loading
tests/src/Functional/MetatagForumTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class MetatagForumTest extends BrowserTestBase { $save_label = (floatval(\Drupal::VERSION) <= 8.3) ? $this->t('Save and publish') : $this->t('Save'); $this->drupalPostForm(NULL, $edit, $save_label); $this->assertResponse(200); $this->assertText(t('@type @title has been created.', ['@type' => $this->t('Forum topic'), '@title' => 'Testing forums'])); $this->assertText($this->t('@type @title has been created.', ['@type' => $this->t('Forum topic'), '@title' => 'Testing forums'])); } }