There are some bugs somewhere that are causing the current tests to fail.

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Status: Active » Closed (works as designed)

Never mind, it was just a false negative caused by a random "userLogin() didn't login" error, I reran the tests and all is well:

$ simpletest8 Metatag

Drupal test run
---------------

Tests to be run:
  - Drupal\metatag\Tests\MetatagAdminTest
  - Drupal\metatag\Tests\MetatagConfigTranslationTest
  - Drupal\metatag\Tests\MetatagFieldTest

Test run started:
  Wednesday, March 9, 2016 - 22:00

Test summary
------------

Drupal\metatag\Tests\MetatagAdminTest                        165 passes                                      
Drupal\metatag\Tests\MetatagConfigTranslationTest             84 passes                                      
Drupal\metatag\Tests\MetatagFieldTest                        114 passes                                      

Test run duration: 3 min 11 sec
damienmckenna’s picture

Status: Closed (works as designed) » Active

The tests work locally but testbot is failing:

fail: [Other] Line 133 of modules/metatag/src/Tests/MetatagTranslationTest.php:
Raw "

fail: [Other] Line 134 of modules/metatag/src/Tests/MetatagTranslationTest.php:
Raw "
mikeyk’s picture

StatusFileSize
new575 bytes

Been working on this - The issue seems to be that Tokens are not being translated properly. Despite $langcode being passed to the replace() function in MetatagManager.php, the code in MetatagToken.php never actually passed it onto the replace function in Token.
Patch attached which fixes this and now MetatagTranslationTest passes on my local machine. Hopefully this resolves this issue!

damienmckenna’s picture

StatusFileSize
new7.57 KB

@mikeyk: Thanks for catching that bug. I did some tweaking on the tests too, this is what I'm probably going to go with.

damienmckenna’s picture

Status: Active » Fixed

Committed. Thanks!

  • DamienMcKenna committed cf71786 on 8.x-1.x
    Issue #2684495 by mikeyk, DamienMcKenna: Fixed bug in translations that...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.