You are here

protected function SmartlingTestBase::invokeMethod in TMGMT Translator Smartling 8.2

Invokes private/protected method.

Parameters

$object:

$methodName:

array $parameters:

Return value

mixed

2 calls to SmartlingTestBase::invokeMethod()
PushBackControllerTest::testUseCallbackUrlDoNotOverrideHost in src/Tests/PushBackControllerTest.php
Use callback url. Do not override host.
PushBackControllerTest::testUseCallbackUrlOverrideHost in src/Tests/PushBackControllerTest.php
Use callback url. Override host.

File

src/Tests/SmartlingTestBase.php, line 106

Class

SmartlingTestBase
Basic tests for the Smartling translator.

Namespace

Drupal\tmgmt_smartling\Tests

Code

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);
}