public function BaseFlowTest::setUp in TMGMT Translator Smartling 8.4
Same name and namespace in other branches
- 8.3 tests/src/Kernel/BaseFlowTest.php \Drupal\Tests\tmgmt_smartling\Kernel\BaseFlowTest::setUp()
Overrides SmartlingTestBase::setUp
File
- tests/
src/ Kernel/ BaseFlowTest.php, line 17
Class
- BaseFlowTest
- Tests base flows.
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();
$logger_mock = $this
->getMockBuilder('\\Drupal\\Core\\Logger\\LoggerChannel')
->setMethods(NULL)
->disableOriginalConstructor()
->getMock();
$this->apiWrapperMock = $this
->getMockBuilder('\\Drupal\\tmgmt_smartling\\Smartling\\SmartlingApiWrapper')
->setMethods([
'deleteFile',
'createAuditLogRecord',
])
->setConstructorArgs([
$api_factory_mock,
$logger_mock,
])
->getMock();
\Drupal::getContainer()
->set('tmgmt_smartling.smartling_api_wrapper', $this->apiWrapperMock);
}