testinaweb / php-access-all
A library to access and to unit test private and protected methods and properties
Installs: 1 569
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.0
Requires (Dev)
- phpunit/phpunit: 4.8.*@dev
This package is not auto-updated.
Last update: 2025-03-11 06:05:19 UTC
README
This library is developed to allow unit tests to test private/protected methods and property values
Install
Use shell:
composer require testinaweb/php-access-all
Use through composer.json:
{ "require": { "testinaweb/php-access-all": "~0.1.0" } }
Usage
use Testinaweb\AccessAll\AccessMethod $result = AccessMethod::invokeMethod($myClass, 'protectedMethod', [$parameter1, $parameter2, ...]);
use Testinaweb\AccessAll\AccessProperty $value = AccessProperty::getProperty($myClass, 'propertyName');