You are here

protected function ConfigImporterServiceTestBase::invokeMethod in Config Importer and Tools 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/ConfigImporterServiceTestBase.php \Drupal\Tests\config_import\Unit\ConfigImporterServiceTestBase::invokeMethod()

Call protected methods of config importing service.

Parameters

string $method: Name of method.

mixed[] $arguments: Any set of arguments for method.

Return value

mixed A value, returned by called method.

1 call to ConfigImporterServiceTestBase::invokeMethod()
ConfigImporterServiceTest::testFilter in tests/src/Unit/ConfigImporterServiceTest.php
Check that configuration will or will not be filtered.

File

tests/src/Unit/ConfigImporterServiceTestBase.php, line 71

Class

ConfigImporterServiceTestBase
Base abstraction for testing the configuration importer service.

Namespace

Drupal\Tests\config_import\Unit

Code

protected function invokeMethod($method, ...$arguments) {
  $method = new \ReflectionMethod($this->configImporter, $method);
  $method
    ->setAccessible(TRUE);
  return $method
    ->invokeArgs($this->configImporter, $arguments);
}