Definition at line 8 of file InlineParserTest.php.
◆ processAjaxPostDataProvider()
processAjaxPostDataProvider |
( |
| ) |
|
- Returns
- array
Definition at line 74 of file InlineParserTest.php.
77 [
'original text 1',
'translated text 1'],
78 [
'original text 2',
'translated text 2',
true]
◆ testProcessAjaxPost()
testProcessAjaxPost |
( |
|
$originalText, |
|
|
|
$translatedText, |
|
|
|
$isPerStore = null |
|
) |
| |
@dataProvider processAjaxPostDataProvider
Definition at line 48 of file InlineParserTest.php.
50 $inputArray = [[
'original' => $originalText,
'custom' => $translatedText]];
51 if ($isPerStore !==
null) {
52 $inputArray[0][
'perstore'] = $isPerStore;
54 $this->_inlineParser->processAjaxPost($inputArray);
57 \
Magento\Translation\Model\StringUtils::class
59 $model->load($originalText);
61 $this->assertEquals($translatedText,
$model->getTranslate());
63 }
catch (\Exception $e) {
66 ->get(\Psr\Log\LoggerInterface::class)
static getObjectManager()
◆ testSetGetIsJson()
Definition at line 82 of file InlineParserTest.php.
84 $isJsonProperty = new \ReflectionProperty(get_class($this->_inlineParser),
'_isJson');
85 $isJsonProperty->setAccessible(
true);
87 $this->assertFalse($isJsonProperty->getValue($this->_inlineParser));
89 $setIsJsonMethod = new \ReflectionMethod($this->_inlineParser,
'setIsJson');
90 $setIsJsonMethod->setAccessible(
true);
91 $setIsJsonMethod->invoke($this->_inlineParser,
true);
93 $this->assertTrue($isJsonProperty->getValue($this->_inlineParser));
◆ $_inlineParser
◆ $_storeId
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/integration/testsuite/Magento/Translation/Model/InlineParserTest.php