PHPackages                             spuniter/php-uniter-package - 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. spuniter/php-uniter-package

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

spuniter/php-uniter-package
===========================

PhpUniter integration package. Assistant for automatic test generation. Commands for registration user and for sending yours class to generate test for it. Class for converting all methods to public on load

00PHP

Since Nov 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/spuniter/php-uniter-package)[ Packagist](https://packagist.org/packages/spuniter/php-uniter-package)[ RSS](/packages/spuniter-php-uniter-package/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Short instruction
-----------------

[](#short-instruction)

composer require spuniter/php-uniter-package php artisan php-uniter:register {email} {password}

// edit .env file // PHP\_UNITER\_ACCESS\_TOKEN= token from your mail // PROJECT\_DIRECTORY= path to project root

php artisan php-uniter:generate {filePath}

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

[](#installation)

You can install the package via composer:

```
composer require  spuniter/php-uniter-package
```

Testing
-------

[](#testing)

To run tests in package, you need to add "PhpUniter\\PackageLaravel\\Tests\\": "vendor/spuniter/php-uniter-package/tests" to "autoload-dev": "psr-4" section of your composer.json

Usage
-----

[](#usage)

### User registration:

[](#user-registration)

```
php artisan php-uniter:register {email} {password}
```

User will be registered, and access token will be sent to your email. You need to put that token to yours .env file as PHP\_UNITER\_ACCESS\_TOKEN. After that you can send test generation queries.

### Package settings:

[](#package-settings)

First, you need to set config values to you .env file:

```
PHP_UNITER_ACCESS_TOKEN=***
```

Access token sent after registration to your email.

Other options you may remain as defaults. Check that unit tests directory (defaults storage/tests/Unit) exists and is writable.

```
PHP_UNITER_BASE_URL=https://uniter1.tech
```

This is web address for our service. Use

```
PHP_UNITER_OBFUSCATE=true
```

Obfuscation option. Set it to false if you need no obfuscation for you code.

```
PHP_UNITER_UNIT_TEST_BASE_CLASS=PHPUnit\Framework\TestCase
```

Base framework for yours test class.

```
PHP_UNITER_UNIT_TESTS_DIRECTORY=tests/Unit
```

Base directory to save generated test classes. Check that directory exists and is writable.

### Test generation

[](#test-generation)

```
php artisan php-uniter:generate {filePath}
```

Your class you want to test will be read from {filePath}, obfuscated if you did not turn obfuscation off, sent to our service. There will be created some phpunit test file to test different variants of yours class methods. The result will be deobfuscated and saved to PHP\_UNITER\_UNIT\_TESTS\_DIRECTORY - to some nested folder according to class namespace.

Open it, read it and use to test yours class.

Generated class, possibly, will not be completed test - read comments before each generated test method.

### Testing

[](#testing-1)

You find package tests in package folder tests.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [PhpUniter](https://github.com/php-uniter)

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef24fa89e9128c89e216f06a90a264c10dcc7499d3c9535e97a31e9d47923120?d=identicon)[spuniter](/maintainers/spuniter)

### Embed Badge

![Health badge](/badges/spuniter-php-uniter-package/health.svg)

```
[![Health](https://phpackages.com/badges/spuniter-php-uniter-package/health.svg)](https://phpackages.com/packages/spuniter-php-uniter-package)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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