function PrivateMethodUnitTestTrait::getMethod
Gets a protected/private method to test.
Parameters
string $fqcn: A fully qualified classname.
string $name: The method name.
Return value
\ReflectionMethod The accessible method.
3 calls to PrivateMethodUnitTestTrait::getMethod()
- CKEditor5Test::testPathsToFormNames in core/
modules/ ckeditor5/ tests/ src/ Unit/ CKEditor5Test.php  - Tests paths to form names.
 - SmartDefaultSettingsTest::testCandidates in core/
modules/ ckeditor5/ tests/ src/ Unit/ SmartDefaultSettingsTest.php  - Tests candidates.
 - SmartDefaultSettingsTest::testSurplusScore in core/
modules/ ckeditor5/ tests/ src/ Unit/ SmartDefaultSettingsTest.php  - Tests surplus score.
 
File
- 
              core/
modules/ ckeditor5/ tests/ src/ Traits/ PrivateMethodUnitTestTrait.php, line 25  
Class
- PrivateMethodUnitTestTrait
 - Provides methods to test protected/private methods in unit tests.
 
Namespace
Drupal\Tests\ckeditor5\TraitsCode
protected static function getMethod(string $fqcn, string $name) : \ReflectionMethod {
  $class = new \ReflectionClass($fqcn);
  $method = $class->getMethod($name);
  return $method;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.