protected function SmartlingTestBase::invokeMethod in TMGMT Translator Smartling 8.3
Same name and namespace in other branches
- 8.4 tests/src/Functional/SmartlingTestBase.php \Drupal\Tests\tmgmt_smartling\Functional\SmartlingTestBase::invokeMethod()
Invokes private/protected method.
Parameters
$object:
$methodName:
array $parameters:
Return value
mixed
2 calls to SmartlingTestBase::invokeMethod()
- PushBackControllerTest::testUseCallbackUrlDoNotOverrideHost in tests/
src/ Functional/ PushBackControllerTest.php - Use callback url. Do not override host.
- PushBackControllerTest::testUseCallbackUrlOverrideHost in tests/
src/ Functional/ PushBackControllerTest.php - Use callback url. Override host.
File
- tests/
src/ Functional/ SmartlingTestBase.php, line 117
Class
- SmartlingTestBase
- Basic tests for the Smartling translator.
Namespace
Drupal\Tests\tmgmt_smartling\FunctionalCode
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);
}