public function TranslationRequestManagerTest::setUp in TMGMT Translator Smartling 8.4
Overrides SmartlingTestBase::setUp
File
- tests/
src/ Kernel/ TranslationRequestManagerTest.php, line 27
Class
- TranslationRequestManagerTest
- Tests TranslationRequestManagerTest class.
Namespace
Drupal\Tests\tmgmt_smartling\KernelCode
public function setUp() : void {
parent::setUp();
$api_factory_mock = $this
->getMockBuilder('\\Drupal\\tmgmt_smartling\\Smartling\\SmartlingApiFactory')
->setMethods(NULL)
->getMock();
$this->apiWrapperMock = $this
->getMockBuilder('\\Drupal\\tmgmt_smartling\\Smartling\\SmartlingApiWrapper')
->setConstructorArgs([
$api_factory_mock,
$this->loggerMock,
])
->getMock();
$this->stateMock = $this
->getMockBuilder('\\Drupal\\Core\\State\\State')
->setMethods([
'get',
])
->disableOriginalConstructor()
->getMock();
$this->stateMock
->expects($this
->any())
->method('get')
->with('tmgmt_smartling.bucket_name')
->willReturn('tmgmt_smartling_bucket');
$this->job = $this
->createJobWithItems([
'batch_uid' => 'uid',
'batch_execute_on_job' => 1,
]);
}