function PrivateMethodUnitTestTrait::getMethod
Same name in other branches
- 9 core/modules/ckeditor5/tests/src/Traits/PrivateMethodUnitTestTrait.php \Drupal\Tests\ckeditor5\Traits\PrivateMethodUnitTestTrait::getMethod()
- 10 core/modules/ckeditor5/tests/src/Traits/PrivateMethodUnitTestTrait.php \Drupal\Tests\ckeditor5\Traits\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 - @covers \Drupal\ckeditor5\Plugin\Editor\CKEditor5::mapViolationPropertyPathsToFormNames @dataProvider providerPathsToFormNames
- SmartDefaultSettingsTest::testCandidates in core/
modules/ ckeditor5/ tests/ src/ Unit/ SmartDefaultSettingsTest.php - @covers ::getCandidates @covers ::selectCandidate @dataProvider providerCandidates
- SmartDefaultSettingsTest::testSurplusScore in core/
modules/ ckeditor5/ tests/ src/ Unit/ SmartDefaultSettingsTest.php - @covers ::computeSurplusScore @dataProvider providerSurplusScore
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.