protected function SmartlingTestBase::invokeMethod in TMGMT Translator Smartling 8.4
Same name in this branch
- 8.4 tests/src/Functional/SmartlingTestBase.php \Drupal\Tests\tmgmt_smartling\Functional\SmartlingTestBase::invokeMethod()
- 8.4 tests/src/Kernel/SmartlingTestBase.php \Drupal\Tests\tmgmt_smartling\Kernel\SmartlingTestBase::invokeMethod()
Invokes private or protected method.
Parameters
$object:
$methodName:
array $parameters:
Return value
mixed
3 calls to SmartlingTestBase::invokeMethod()
- XmlPluginTest::testParseInvalidSlVariantKeyEntityData in tests/
src/ Kernel/ XmlPluginTest.php - Test sl-variant parsing: invalid string (entity data).
- XmlPluginTest::testParseInvalidSlVariantKeyFieldData in tests/
src/ Kernel/ XmlPluginTest.php - Test sl-variant parsing: invalid string (field data).
- XmlPluginTest::testParseValidSlVariantKey in tests/
src/ Kernel/ XmlPluginTest.php - Test sl-variant parsing: valid string.
File
- tests/
src/ Kernel/ SmartlingTestBase.php, line 148
Class
- SmartlingTestBase
- Smartling kernel test base class.
Namespace
Drupal\Tests\tmgmt_smartling\KernelCode
protected function invokeMethod($object, $methodName, array $parameters = []) {
$reflection = new \ReflectionClass(get_class($object));
$method = $reflection
->getMethod($methodName);
$method
->setAccessible(true);
return $method
->invokeArgs($object, $parameters);
}