<commit_before># Asynchronicity

[![Build Status](https://travis-ci.org/matthiasnoback/phpunit-asynchronicity.svg?branch=master)](https://travis-ci.org/matthiasnoback/phpunit-asynchronicity)

Using this library you can make a test wait for certain conditions, e.g. to test the output of another process.

See my [blog post on the subject](https://matthiasnoback.nl/2014/03/test-symfony2-commands-using-the-process-component-and-asynchronous-assertions/) for an explanation of the concepts and some code samples. Please note that this article covers version 1 of the library.

# Usage

## With PHPUnit

```php
use Asynchronicity\PHPUnit\Asynchronicity;
use PHPUnit\Framework\Assert;
use PHPUnit\Framework\TestCase;

final class ProcessTest extends TestCase
{
    use Asynchronicity;<commit_msg>Remove Travis build icon<commit_after># Asynchronicity

Using this library you can make a test wait for certain conditions, e.g. to test the output of another process.

See my [blog post on the subject](https://matthiasnoback.nl/2014/03/test-symfony2-commands-using-the-process-component-and-asynchronous-assertions/) for an explanation of the concepts and some code samples. Please note that this article covers version 1 of the library.

# Usage

## With PHPUnit

```php
use Asynchronicity\PHPUnit\Asynchronicity;
use PHPUnit\Framework\Assert;
use PHPUnit\Framework\TestCase;

final class ProcessTest extends TestCase
{
    use Asynchronicity;
{'fraction_non_alphanumeric': 0.08623087621696801, 'fraction_numerical': 0.011126564673157162, 'mean_word_length': 5.14957264957265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1580171', 'n_tokens_mistral': 447, 'n_tokens_neox': 431, 'n_words': 138}