PHPackages                             jstewmc/test-case - 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. jstewmc/test-case

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

jstewmc/test-case
=================

Access private properties in unit tests

v2.0.0(8y ago)015020MITPHPPHP ^7.0

Since Jul 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jstewmc/test-case)[ Packagist](https://packagist.org/packages/jstewmc/test-case)[ RSS](/packages/jstewmc-test-case/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (4)Used By (20)

test-case
=========

[](#test-case)

Access private properties in unit tests.

```
use Jstewmc\TestCase\TestCase;

class Test extends TestCase
{
    public function testFoo()
    {
        $class = new class { private $foo = 'bar'; };

        $this->assertEquals('bar', $this->getProperty('foo', $class));

        return;
    }
}
```

License
-------

[](#license)

[MIT](https://github.com/jstewmc/test-case/blob/master/LICENSE)

Author
------

[](#author)

[Jack Clayton](mailto:clayjs0@gmail.com)

Version
-------

[](#version)

### 2.0.0, July 4, 2017

[](#200-july-4-2017)

- Update PHPUnit's major version from `^5.4` to `^6.2`.

### 1.0.0, August 13, 2016

[](#100-august-13-2016)

- Stable release

### 0.1.0, July 28, 2016

[](#010-july-28-2016)

- Initial release

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity60

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 ~170 days

Total

3

Last Release

3282d ago

Major Versions

v0.1.0 → v1.0.02016-07-29

v1.0.0 → v2.0.02017-07-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/50fecae0a7fd2119681bc133e496e7166b01a59f850a3c909e100bd427c6b28b?d=identicon)[Jstewmc](/maintainers/Jstewmc)

---

Top Contributors

[![jstewmc](https://avatars.githubusercontent.com/u/1192893?v=4)](https://github.com/jstewmc "jstewmc (6 commits)")

---

Tags

phppropertiesprivatejstewmctest case

### Embed Badge

![Health badge](/badges/jstewmc-test-case/health.svg)

```
[![Health](https://phpackages.com/badges/jstewmc-test-case/health.svg)](https://phpackages.com/packages/jstewmc-test-case)
```

###  Alternatives

[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.0M321](/packages/drupal-core-dev)[robiningelbrecht/phpunit-pretty-print

Prettify PHPUnit output

77514.9k15](/packages/robiningelbrecht-phpunit-pretty-print)[juampi92/test-seo

Easy way to test your SEO

26344.3k](/packages/juampi92-test-seo)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

17114.2k44](/packages/robiningelbrecht-phpunit-coverage-tools)

PHPackages © 2026

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