public function TranslationProgressCalculatorTest::testCalculateInvalidData in TMGMT Translator Smartling 8.3
Tests calculate: invalid data.
@expectedException \InvalidArgumentException @expectedExceptionMessage Invalid input data: {"totalStringCount":0}
File
- tests/
src/ Kernel/ TranslationProgressCalculatorTest.php, line 49
Class
- TranslationProgressCalculatorTest
- Tests for progress calculator.
Namespace
Drupal\Tests\tmgmt_smartling\KernelCode
public function testCalculateInvalidData() {
$logger_mock = $this
->getMockBuilder('\\Drupal\\Core\\Logger\\LoggerChannel')
->setMethods(NULL)
->disableOriginalConstructor()
->getMock();
$calculator = new TranslationProgressCalculator($logger_mock);
$calculator
->calculate([
"totalStringCount" => 0,
]);
}