Skip to content

Commit 270a425

Browse files
authored
Update docs
1 parent 670358f commit 270a425

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
# phpunit-util
1+
# amphp/phpunit-util
22

3-
![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)
4-
5-
`amphp/phpunit-util` is a small helper package to ease testing with PHPUnit in combination with the [`Amp`](https://github.com/amphp/amp) concurrency framework.
6-
7-
**Required PHP Version**
3+
AMPHP is a collection of event-driven libraries for PHP designed with fibers and concurrency in mind.
4+
`amphp/phpunit-util` is a small helper package to ease testing with PHPUnit.
85

9-
- PHP 7.1+
6+
![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)
107

118
## Installation
129

10+
This package can be installed as a [Composer](https://getcomposer.org/) dependency.
11+
1312
```bash
1413
composer require --dev amphp/phpunit-util
1514
```
1615

16+
The package requires PHP 8.1 or later.
17+
1718
## Usage
1819

1920
```php
@@ -28,12 +29,12 @@ use Amp\Socket;
2829
class BarTest extends AsyncTestCase
2930
{
3031
// Each test case is executed as a coroutine and checked to run to completion
31-
public function test()
32+
public function test(): void
3233
{
33-
$socket = yield Socket\connect('tcp://localhost:12345');
34-
yield $socket->write('foobar');
34+
$socket = Socket\connect('tcp://localhost:12345');
35+
$socket->write('foobar');
3536

36-
$this->assertSame('foobar', yield ByteStream\buffer($socket));
37+
$this->assertSame('foobar', ByteStream\buffer($socket));
3738
}
3839
}
3940
```

0 commit comments

Comments
 (0)