2017 © Pedro Peláez
 

library phpunit-util

Helper package to ease testing with PHPUnit.

image

amphp/phpunit-util

Helper package to ease testing with PHPUnit.

  • Sunday, July 22, 2018
  • by kelunik
  • Repository
  • 4 Watchers
  • 8 Stars
  • 10,181 Installations
  • PHP
  • 42 Dependents
  • 0 Suggesters
  • 1 Forks
  • 3 Open issues
  • 3 Versions
  • 7 % Grown

The README.md

amphp/phpunit-util

AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind. amphp/phpunit-util is a small helper package to ease testing with PHPUnit., (*1)

License, (*2)

Installation

This package can be installed as a Composer dependency., (*3)

composer require --dev amphp/phpunit-util

The package requires PHP 8.1 or later., (*4)

Usage

<?php

namespace Foo;

use Amp\ByteStream;
use Amp\PHPUnit\AsyncTestCase;
use Amp\Socket;

class BarTest extends AsyncTestCase
{
    // Each test case is executed as a coroutine and checked to run to completion
    public function test(): void
    {
        $socket = Socket\connect('tcp://localhost:12345');
        $socket->write('foobar');

        $this->assertSame('foobar', ByteStream\buffer($socket));
    }
}

The Versions

22/07 2018

dev-ext-async

dev-ext-async http://amphp.org/phpunit-util

Helper package to ease testing with PHPUnit.

  Sources   Download

MIT

The Requires

 

The Development Requires

15/06 2017

dev-master

9999999-dev http://amphp.org/phpunit-util

Helper package to ease testing with PHPUnit.

  Sources   Download

MIT

The Requires

 

The Development Requires

15/06 2017

v1.0.0

1.0.0.0 http://amphp.org/phpunit-util

Helper package to ease testing with PHPUnit.

  Sources   Download

MIT

The Requires

 

The Development Requires