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

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

phine/test
==========

A PHP library for improving unit testing.

1.0.1(12y ago)21.5k11MITPHPPHP &gt;=5.3.3

Since Oct 16Pushed 12y agoCompare

[ Source](https://github.com/kherge-archive/lib-test)[ Packagist](https://packagist.org/packages/phine/test)[ Docs](https://github.com/phine/lib-test)[ RSS](/packages/phine-test/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (11)

Test
====

[](#test)

[![Build Status](https://camo.githubusercontent.com/901664b8c4d75cde1b70c1d0c0346d696266ff013d7a0079e6d14dd273348899/68747470733a2f2f7472617669732d63692e6f72672f7068696e652f6c69622d746573742e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/phine/lib-test)[![Coverage Status](https://camo.githubusercontent.com/a84829336f616f9f8057fc8bf5b84241a3eb8e4b4db558e179e33349414ec932/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f7068696e652f6c69622d746573742f62616467652e706e67)](https://coveralls.io/r/phine/lib-test)[![Latest Stable Version](https://camo.githubusercontent.com/465ee7e011b3704613272bc9ea35000c2250b55adb658e43f4176134b220f8a7/68747470733a2f2f706f7365722e707567782e6f72672f7068696e652f746573742f762f737461626c652e706e67)](https://packagist.org/packages/phine/test)[![Total Downloads](https://camo.githubusercontent.com/de503beec34c86451a18c68a3369943a663a8b57650d85f9e0d6eeea5078b5e2/68747470733a2f2f706f7365722e707567782e6f72672f7068696e652f746573742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/phine/test)

A PHP library for improving unit testing.

Usage
-----

[](#usage)

```
use Phine\Test\Method;
use Phine\Test\Property;
use Phine\Test\Temp;

class Example
{
    private static $isStatic = 'original';

    private $nonStatic = 'original';

    protected static function isStatic($arg)
    {
        return "Static: $arg";
    }

    protected function nonStatic($arg)
    {
        return "Non static: $arg";
    }
}

$example = new Example();

// retrieve hidden values
echo Property::get('Example', 'isStatic'); // "original"
echo Property::get($example, 'nonStatic'); // "original"

// change hidden values
Property::set('Example', 'isStatic', 'changed');
Property::set($example, 'nonStatic', 'changed');

echo Property::get('Example', 'isStatic'); // "changed"
echo Property::get($example, 'nonStatic'); // "changed"

// invoke hidden methods
echo Method::invoke('Example', 'isStatic', 123); // "Static: 123"
echo Method::invoke($example, 'nonStatic', 456); // "Non static: 456"

echo Method::invokeArgs('Example', 'isStatic', array(123)); // "Static: 123"
echo Method::invokeArgs($example, 'nonStatic', array(456)); // "Static: 456"

$temp = new Temp();

// create temporary paths
$dir = $temp->createDir();
$file = $temp->createFile();

// copy existing paths to temporary ones (names are preserved)
$dir = $temp->copyDir('/path/to/dir');
$file = $temp->copyFile('/path/to/file');

// purge all temporary paths
$temp->purgePaths();
```

Requirement
-----------

[](#requirement)

- PHP &gt;= 5.3.3
- [Phine Exception](https://github.com/phine/lib-exception) &gt;= 1.0

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

[](#installation)

Via [Composer](http://getcomposer.org/):

```
$ composer require "phine/test=~1.0"

```

Documentation
-------------

[](#documentation)

You can find the documentation in the [`docs/`](docs/) directory.

License
-------

[](#license)

This library is available under the [MIT license](LICENSE).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

2

Last Release

4518d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9122157?v=4)[Kevin Herrera](/maintainers/kherge)[@kherge](https://github.com/kherge)

---

Top Contributors

[![kherge](https://avatars.githubusercontent.com/u/9122157?v=4)](https://github.com/kherge "kherge (8 commits)")

---

Tags

unittest

### Embed Badge

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

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

###  Alternatives

[colinodell/psr-testlogger

PSR-3 compliant test logger based on psr/log v1's, but compatible with v2 and v3 too!

1712.1M47](/packages/colinodell-psr-testlogger)[diablomedia/phpunit-pretty-printer

A PHPUnit result printer that shows per-file test progress and execution times

78515.2k5](/packages/diablomedia-phpunit-pretty-printer)[icecave/isolator

Dependency injection for global functions.

371.3M29](/packages/icecave-isolator)[elliotchance/concise

Concise is test framework for using plain English and minimal code, built on PHPUnit.

45223.8k4](/packages/elliotchance-concise)[sofa/eloquent-testsuite

Helpers for fast and reliable UNIT tests for your Eloquent Models with PHPUnit

10104.7k](/packages/sofa-eloquent-testsuite)[protomock/protomock

Mocking native PHP requests (file\_get\_contents(), ...)

2024.6k](/packages/protomock-protomock)

PHPackages © 2026

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