You are here

public function TranslationProgressCalculatorTest::testValidate in TMGMT Translator Smartling 8.3

Tests validate.

@dataProvider providerTestValidate

Parameters

$test_data:

$result:

File

tests/src/Kernel/TranslationProgressCalculatorTest.php, line 69

Class

TranslationProgressCalculatorTest
Tests for progress calculator.

Namespace

Drupal\Tests\tmgmt_smartling\Kernel

Code

public function testValidate($test_data, $result) {
  $logger_mock = $this
    ->getMockBuilder('\\Drupal\\Core\\Logger\\LoggerChannel')
    ->setMethods(NULL)
    ->disableOriginalConstructor()
    ->getMock();
  $calculator = new TranslationProgressCalculator($logger_mock);
  $this
    ->assertEquals($calculator
    ->isValid($test_data), $result);
}