You are here

public function TwitterProfileTest::getAccessibleMethod in Twitter Profile Widget 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/TwitterProfileTest.php \Drupal\Tests\twitter_profile_widget\Unit\TwitterProfileTest::getAccessibleMethod()
  2. 3.x tests/src/Unit/TwitterProfileTest.php \Drupal\Tests\twitter_profile_widget\Unit\TwitterProfileTest::getAccessibleMethod()

Get an accessible method using reflection.

1 call to TwitterProfileTest::getAccessibleMethod()
TwitterProfileTest::testQuery in tests/src/Unit/TwitterProfileTest.php
Test TwitterProfile::buildQuery().

File

tests/src/Unit/TwitterProfileTest.php, line 21

Class

TwitterProfileTest
Tests the "TwitterProfile" service, which builds Twitter API queries.

Namespace

Drupal\Tests\twitter_profile_widget\Unit

Code

public function getAccessibleMethod($class_name, $method_name) {
  $class = new \ReflectionClass($class_name);
  $method = $class
    ->getMethod($method_name);
  $method
    ->setAccessible(TRUE);
  return $method;
}