PHPackages                             komex/unteist - 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. [Framework](/categories/framework)
4. /
5. komex/unteist

ActiveLibrary[Framework](/categories/framework)

komex/unteist
=============

Unit test framework

v1.1.2(12y ago)11.3kCC-BY-SA-3.0PHPPHP &gt;=5.4.0

Since Sep 4Pushed 11y ago1 watchersCompare

[ Source](https://github.com/komex/unteist)[ Packagist](https://packagist.org/packages/komex/unteist)[ RSS](/packages/komex-unteist/feed)WikiDiscussions develop Synced 2w ago

READMEChangelogDependencies (12)Versions (6)Used By (0)

\#Unteist

Unteist is a unit test framework for developers and testers that makes the writing of tests easy and gets its result more quickly than ever. It does not load all tests collections to memory but does it step-by-step. One process - one test case in memory. You can use up to 10 processes for testing. Framework is more flexible in configuration of tests, test cases and suites than "[the de-facto standard for unit testing in PHP projects](https://github.com/sebastianbergmann/phpunit)".

[![Build Status](https://camo.githubusercontent.com/6781740a177a780013a2caed1900b07715e9fd879811720d74f161e159352705/68747470733a2f2f7472617669732d63692e6f72672f6b6f6d65782f756e74656973742e706e673f6272616e63683d646576656c6f70)](https://travis-ci.org/komex/unteist)

Requirements
------------

[](#requirements)

- Unteist requires PHP 5.4 (or later).
- (Optional) [pcntl](http://www.php.net/manual/en/book.pcntl.php) module if you want to run tests in multiple processes.

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

[](#installation)

To add Unteist as a dependency to your project, simply add a dependency on `komex/unteist` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file:

```
    {
        "require": {
            "komex/unteist": "1.0.*"
        }
    }
```

Unteist may generate reports in HTML format. Right now, reports are very simple, but it may be more complex in future. So, framework needs [Bootstrap](http://getbootstrap.com/2.3.2/), [lessphp](http://leafo.net/lessphp/) and jQuery for working.

Writing tests
-------------

[](#writing-tests)

You can place your tests in any directory as you wish, but storing it in `tests` directory is a good practice. There is no problems with understanding how to write tests if you have already worked with [PHPUnit](http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html).

- The tests for a class `Class` go into a class `ClassTest`.
- `ClassTest` inherits from `\Unteist\TestCase`.
- The tests are public methods that are named `test*`. Alternatively, you can use the `@test` annotation in a method's docblock to mark it as a test method.
- Inside the test methods, assertion methods such as `\Unteist\Assert\Assert::equals()` are used to assert that an actual value matches an expected value.

### Example

[](#example)

```
