Skip to content
Helper package to ease testing with PHPUnit.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
test
.editorconfig
.gitattributes
.gitignore
.php_cs.dist
.travis.yml
CONTRIBUTING.md
LICENSE Convert code style to PSR-2 Feb 11, 2019
README.md
composer.json Trait magic to support PHPUnit 6, 7, and 8 Mar 9, 2019
phpunit.xml.dist

README.md

phpunit-util

License

amphp/phpunit-util is a small helper package to ease testing with PHPUnit in combination with the amp concurrency framework.

Required PHP Version

  • PHP 7.0+

Installation

composer require --dev amphp/phpunit-util

Usage

Currently, this package only provides a PHPUnit TestListener to reset the global event loop after each test. By adding the listener to your PHPUnit configuration, each test will be executed with a completely new event loop instance.

<phpunit>
    <!-- ... -->

    <listeners>
        <listener class="Amp\PHPUnit\LoopReset" />
    </listeners>

    <!-- ... -->
</phpunit>
You can’t perform that action at this time.