Issue #2127487 by chx: GetStringTranslationStub() ignores variables.
parent
5a9c4bec9c
commit
b9dfcae3f9
|
@ -177,7 +177,7 @@ abstract class UnitTestCase extends \PHPUnit_Framework_TestCase {
|
||||||
$translation = $this->getMock('Drupal\Core\StringTranslation\TranslationInterface');
|
$translation = $this->getMock('Drupal\Core\StringTranslation\TranslationInterface');
|
||||||
$translation->expects($this->any())
|
$translation->expects($this->any())
|
||||||
->method('translate')
|
->method('translate')
|
||||||
->will($this->returnArgument(0));
|
->will($this->returnCallback(function ($string, array $args = array()) { return strtr($string, $args); }));
|
||||||
return $translation;
|
return $translation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue