protected function LingotekUnitTest::setUp in Lingotek Translation 8
Same name and namespace in other branches
- 8.2 tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
- 4.0.x tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
- 3.0.x tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
- 3.1.x tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
- 3.2.x tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
- 3.3.x tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
- 3.4.x tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
- 3.5.x tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
- 3.6.x tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
- 3.7.x tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
- 3.8.x tests/src/Unit/LingotekUnitTest.php \Drupal\Tests\lingotek\Unit\LingotekUnitTest::setUp()
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ LingotekUnitTest.php, line 46
Class
- LingotekUnitTest
- @coversDefaultClass \Drupal\lingotek\Lingotek @group lingotek @preserveGlobalState disabled
Namespace
Drupal\Tests\lingotek\UnitCode
protected function setUp() {
$this->api = $this
->getMock('\\Drupal\\lingotek\\Remote\\LingotekApiInterface');
$this->languageLocaleMapper = $this
->getMock('Drupal\\lingotek\\LanguageLocaleMapperInterface');
$this->config = $this
->getMockBuilder('\\Drupal\\Core\\Config\\Config')
->disableOriginalConstructor()
->getMock();
$config_factory = $this
->getMock('\\Drupal\\Core\\Config\\ConfigFactoryInterface');
$config_factory
->expects($this
->once())
->method('getEditable')
->with('lingotek.settings')
->will($this
->returnValue($this->config));
$this->lingotek = new Lingotek($this->api, $this->languageLocaleMapper, $config_factory);
}