testinaweb/php-access-all

A library to access and to unit test private and protected methods and properties

0.1.0 2016-04-11 10:57 UTC

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');