This library is developed to allow unit tests to test private/protected methods and property values
Use shell:
composer require testinaweb/php-access-all
Use through composer.json:
{
"require": {
"testinaweb/php-access-all": "~0.1.0"
}
}
use Testinaweb\AccessAll\AccessMethod
$result = AccessMethod::invokeMethod($myClass, 'protectedMethod', [$parameter1, $parameter2, ...]);
use Testinaweb\AccessAll\AccessProperty
$value = AccessProperty::getProperty($myClass, 'propertyName');