You are here

protected static function LicenseCronExpiryTest::getMethod in Commerce License 8.2

Gets a protected method for testing.

Parameters

string $class: Name of the class.

string $name: Name of the method.

Return value

mixed The method.

2 calls to LicenseCronExpiryTest::getMethod()
LicenseCronExpiryTest::testGetLicenseIdsToExpireTomorrow in tests/src/Kernel/LicenseCronExpiryTest.php
License hasn't expired.
LicenseCronExpiryTest::testGetLicenseIdsToExpireYesterday in tests/src/Kernel/LicenseCronExpiryTest.php
License has expired.

File

tests/src/Kernel/LicenseCronExpiryTest.php, line 110

Class

LicenseCronExpiryTest
Tests that cron expires a license.

Namespace

Drupal\Tests\commerce_license\Kernel\System

Code

protected static function getMethod($class, $name) {
  $class = new ReflectionClass($class);
  $method = $class
    ->getMethod($name);
  $method
    ->setAccessible(TRUE);
  return $method;
}