function ProtectedPrivatesSubclass::subclassProtectedAdd

Same name and namespace in other branches
  1. 4.0.x modules/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\Subclasses

Code

public function subclassProtectedAdd($a, $b) {
    return $this->protectedAdd($a, $b);
}