PHPackages                             rootwork/phpunit-helpers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. rootwork/phpunit-helpers

ActiveLibrary[Testing &amp; Quality](/categories/testing)

rootwork/phpunit-helpers
========================

PHPUnit Helpers

2.0.0(8y ago)18.8k—2.9%3BSD-3-ClausePHPPHP &gt;=5.4

Since Feb 8Pushed 8y ago3 watchersCompare

[ Source](https://github.com/rootworkit/phpunit-helpers)[ Packagist](https://packagist.org/packages/rootwork/phpunit-helpers)[ Docs](https://github.com/rootworkit/phpunit-helpers)[ RSS](/packages/rootwork-phpunit-helpers/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (5)Used By (3)

PHPUnit Helpers
===============

[](#phpunit-helpers)

Helper traits for PHPUnit

*"You can touch your privates and you can touch your friends' privates but you can't touch your parents' privates... unless they're protected."*-Unknown

Installation
------------

[](#installation)

Install composer in a common location or in your project:

```
curl -s http://getcomposer.org/installer | php
```

Create the composer.json file as follows:

```
{
    "require": {
        "rootwork/phpunit-helpers": "dev-master"
    }
}
```

Run the composer installer:

```
php composer.phar install
```

Usage
-----

[](#usage)

```
namespace Test;

use Rootwork\PHPUnit\Helper\Accessor;

class MyTest extends \PHPUnit_Framework_TestCase
{
    use Accessor;

    public function testThings()
    {
        $sut = new MyThing();

        // Set a non-public property
        $this->setPropertyValue($sut, 'someNonPublicProperty', 'foo');

        // Get a non-public property
        $result = $this->getPropertyValue($sut, 'someNonPublicProperty'); // foo

        // Invoke a non-public method
        $this->invokeMethod($sut, 'someNonPublicMethod', ['foo', 'bar']);

        // Invoke a non-public method with arguments
        $this->invokeMethod($sut, 'someNonPublicMethod', ['foo', 'bar']);
    }
}
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~252 days

Total

3

Last Release

3247d ago

Major Versions

1.0.1 → 2.0.02017-06-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f2027f895e618ab70939adcfd544205a82cfb11096309b4bc556a6cfc8f6910?d=identicon)[rootwork](/maintainers/rootwork)

---

Top Contributors

[![mikesoule](https://avatars.githubusercontent.com/u/235210?v=4)](https://github.com/mikesoule "mikesoule (15 commits)")

---

Tags

phpunitrootwork

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rootwork-phpunit-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/rootwork-phpunit-helpers/health.svg)](https://phpackages.com/packages/rootwork-phpunit-helpers)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.8k](/packages/phpunit-phpunit)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[johnkary/phpunit-speedtrap

Find and report on slow tests in your PHPUnit test suite

78337.2M122](/packages/johnkary-phpunit-speedtrap)[spatie/phpunit-snapshot-assertions

Snapshot testing with PHPUnit

69617.9M510](/packages/spatie-phpunit-snapshot-assertions)[dg/bypass-finals

Removes final keyword from source code on-the-fly and allows mocking of final methods and classes

57026.3M456](/packages/dg-bypass-finals)[phpspec/prophecy-phpunit

Integrating the Prophecy mocking library in PHPUnit test cases

19454.9M1.4k](/packages/phpspec-prophecy-phpunit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
