Commit b9dfcae3 authored by alexpott's avatar alexpott

Issue #2127487 by chx: GetStringTranslationStub() ignores variables.

parent 5a9c4bec
......@@ -177,7 +177,7 @@ public function getStringTranslationStub() {
$translation = $this->getMock('Drupal\Core\StringTranslation\TranslationInterface');
$translation->expects($this->any())
->method('translate')
->will($this->returnArgument(0));
->will($this->returnCallback(function ($string, array $args = array()) { return strtr($string, $args); }));
return $translation;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment