protected function StringTranslationTraitTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/StringTranslation/StringTranslationTraitTest.php \Drupal\Tests\Core\StringTranslation\StringTranslationTraitTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ StringTranslation/ StringTranslationTraitTest.php, line 36 - Contains \Drupal\Tests\Core\StringTranslation\StringTranslationTraitTest.
Class
- StringTranslationTraitTest
- @coversDefaultClass \Drupal\Core\StringTranslation\StringTranslationTrait @group StringTranslation
Namespace
Drupal\Tests\Core\StringTranslationCode
protected function setUp() {
$this->translation = $this
->getObjectForTrait('\\Drupal\\Core\\StringTranslation\\StringTranslationTrait');
$stub = $this
->getStringTranslationStub();
$stub
->expects($this
->any())
->method('formatPlural')
->will($this
->returnArgument(2));
$this->translation
->setStringTranslation($stub);
$this->reflection = new \ReflectionClass(get_class($this->translation));
}