You are here

protected static function ExtraFieldManagerBaseTest::callMethod in Extra Field 8.2

Calls protected methods on an abstract class.

Parameters

object $object: The class to call the method on.

string $name: The method name.

array $arguments: The arguments to call the method with.

Return value

mixed The method result.

5 calls to ExtraFieldManagerBaseTest::callMethod()
ExtraFieldManagerBaseTest::testAllEntityBundles in tests/src/Unit/ExtraFieldManagerBaseTest.php
@covers ::allEntityBundles
ExtraFieldManagerBaseTest::testEntityBundleKey in tests/src/Unit/ExtraFieldManagerBaseTest.php
@covers ::entityBundleKey
ExtraFieldManagerBaseTest::testFieldName in tests/src/Unit/ExtraFieldManagerBaseTest.php
@covers ::entityBundleKey
ExtraFieldManagerBaseTest::testMatchEntityBundleKey in tests/src/Unit/ExtraFieldManagerBaseTest.php
@covers ::matchEntityBundleKey
ExtraFieldManagerBaseTest::testSupportedEntityBundles in tests/src/Unit/ExtraFieldManagerBaseTest.php
@covers ::supportedEntityBundles

File

tests/src/Unit/ExtraFieldManagerBaseTest.php, line 323

Class

ExtraFieldManagerBaseTest
@coversDefaultClass \Drupal\extra_field\Plugin\ExtraFieldManagerBase

Namespace

Drupal\Tests\extra_field\Unit

Code

protected static function callMethod($object, $name, array $arguments) {
  $class = new \ReflectionClass($object);
  $method = $class
    ->getMethod($name);
  $method
    ->setAccessible(TRUE);
  return $method
    ->invokeArgs($object, $arguments);
}