public function ProtectedPrivatesSubclass::subclassProtectedAdd in Examples for Developers 3.x
Same name and namespace in other branches
- 8 phpunit_example/tests/src/Unit/Subclasses/ProtectedPrivatesSubclass.php \Drupal\Tests\phpunit_example\Unit\Subclasses\ProtectedPrivatesSubclass::subclassProtectedAdd()
A stub class so we can access a protected method.
We use a naming convention to make it clear that we are using a shimmed method.
File
- modules/
phpunit_example/ tests/ src/ Unit/ Subclasses/ ProtectedPrivatesSubclass.php, line 26
Class
- ProtectedPrivatesSubclass
- A class for testing ProtectedPrivate::protectedAdd().
Namespace
Drupal\Tests\phpunit_example\Unit\SubclassesCode
public function subclassProtectedAdd($a, $b) {
return $this
->protectedAdd($a, $b);
}