Loading CHANGELOG.txt +2 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ Metatag 8.x-1.x-dev, xxxx-xx-xx #3182548 by DamienMcKenna: Fix tests on 8.x-1.x branch for D9.1. #3158186 by siddhant.bhosale, rahulrasgon, rokzabukovec, sabina.h, DamienMcKenna: Replace usages of assertions that are deprecated. #3186770 by mortim07: System status report page indicates Metatag's token types do not have any tokens defined. Metatag 8.x-1.15, 2020-12-05 Loading metatag.tokens.inc +6 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,12 @@ function metatag_token_info() { 'nested' => TRUE, ]; $info['tokens'][$metatag_token_name]['value'] = [ 'name' => Html::escape($label), 'module' => 'metatag', 'description' => $description, ]; // Tag list token type. if ($multiple) { $info['types']["list<$metatag_token_name>"] = [ Loading tests/src/Functional/MetatagTokenStatus.php 0 → 100644 +52 −0 Original line number Diff line number Diff line <?php namespace Drupal\Tests\metatag\Functional; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; /** * Test the token status for metatag. * * @group metatag */ class MetatagTokenStatus extends BrowserTestBase { /** * {@inheritdoc} */ public static $modules = ['metatag']; /** * {@inheritdoc} */ protected $defaultTheme = 'stark'; /** * Test the status report does not contain warnings about types. * * @see token_get_token_problems */ function testStatusReportTypesWarning() { $this->drupalLogin($this->rootUser); $this->drupalGet(Url::fromRoute('system.status')); $this->assertSession()->pageTextNotContains('$info[\'types\'][\'metatag'); } /** * Test the status report does not contain warnings about tokens. * * @see token_get_token_problems */ function testStatusReportTokensWarning() { $this->drupalLogin($this->rootUser); $this->drupalGet(Url::fromRoute('system.status')); $this->assertSession()->pageTextNotContains('$info[\'tokens\'][\'metatag'); } } Loading
CHANGELOG.txt +2 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,8 @@ Metatag 8.x-1.x-dev, xxxx-xx-xx #3182548 by DamienMcKenna: Fix tests on 8.x-1.x branch for D9.1. #3158186 by siddhant.bhosale, rahulrasgon, rokzabukovec, sabina.h, DamienMcKenna: Replace usages of assertions that are deprecated. #3186770 by mortim07: System status report page indicates Metatag's token types do not have any tokens defined. Metatag 8.x-1.15, 2020-12-05 Loading
metatag.tokens.inc +6 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,12 @@ function metatag_token_info() { 'nested' => TRUE, ]; $info['tokens'][$metatag_token_name]['value'] = [ 'name' => Html::escape($label), 'module' => 'metatag', 'description' => $description, ]; // Tag list token type. if ($multiple) { $info['types']["list<$metatag_token_name>"] = [ Loading
tests/src/Functional/MetatagTokenStatus.php 0 → 100644 +52 −0 Original line number Diff line number Diff line <?php namespace Drupal\Tests\metatag\Functional; use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; /** * Test the token status for metatag. * * @group metatag */ class MetatagTokenStatus extends BrowserTestBase { /** * {@inheritdoc} */ public static $modules = ['metatag']; /** * {@inheritdoc} */ protected $defaultTheme = 'stark'; /** * Test the status report does not contain warnings about types. * * @see token_get_token_problems */ function testStatusReportTypesWarning() { $this->drupalLogin($this->rootUser); $this->drupalGet(Url::fromRoute('system.status')); $this->assertSession()->pageTextNotContains('$info[\'types\'][\'metatag'); } /** * Test the status report does not contain warnings about tokens. * * @see token_get_token_problems */ function testStatusReportTokensWarning() { $this->drupalLogin($this->rootUser); $this->drupalGet(Url::fromRoute('system.status')); $this->assertSession()->pageTextNotContains('$info[\'tokens\'][\'metatag'); } }