You are here

public function SmartlingTranslatorTest::setUp in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/SmartlingTranslatorTest.php \Drupal\Tests\tmgmt_smartling\Kernel\SmartlingTranslatorTest::setUp()

Overrides SmartlingTestBase::setUp

File

tests/src/Kernel/SmartlingTranslatorTest.php, line 27

Class

SmartlingTranslatorTest
Tests for smartling translator.

Namespace

Drupal\Tests\tmgmt_smartling\Kernel

Code

public function setUp() : void {
  parent::setUp();
  require_once __DIR__ . '/../../../vendor/autoload.php';
  $this->smartlingTranslator = $this
    ->getMockBuilder(SmartlingTranslatorBeingTested::class)
    ->disableOriginalConstructor()
    ->setMethods(NULL)
    ->getMock();
  $this->moduleHandler = $this
    ->getMockBuilder(ModuleHandler::class)
    ->setMethods([
    'alter',
  ])
    ->disableOriginalConstructor()
    ->getMock();
  $this->smartlingTranslator->moduleHandler = $this->moduleHandler;
}