Skip to content

Commit 67ce7d2

Browse files
committed
Update test environment and dev dependencies
1 parent 581b27c commit 67ce7d2

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

README.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ Once released, this project will follow [SemVer](https://semver.org/).
496496
At the moment, this will install the latest development version:
497497

498498
```bash
499-
$ composer require clue/redis-react:^3@dev
499+
composer require clue/redis-react:^3@dev
500500
```
501501

502502
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
@@ -510,7 +510,7 @@ smooth upgrade path. You may target multiple versions at the same time to
510510
support a wider range of PHP versions like this:
511511

512512
```bash
513-
$ composer require "clue/redis-react:^3@dev || ^2"
513+
composer require "clue/redis-react:^3@dev || ^2"
514514
```
515515

516516
## Tests
@@ -519,13 +519,21 @@ To run the test suite, you first need to clone this repo and then install all
519519
dependencies [through Composer](https://getcomposer.org/):
520520

521521
```bash
522-
$ composer install
522+
composer install
523523
```
524524

525525
To run the test suite, go to the project root and run:
526526

527527
```bash
528-
$ vendor/bin/phpunit
528+
vendor/bin/phpunit
529+
```
530+
531+
The test suite is set up to always ensure 100% code coverage across all
532+
supported environments. If you have the Xdebug extension installed, you can also
533+
generate a code coverage report locally like this:
534+
535+
```bash
536+
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text
529537
```
530538

531539
The test suite contains both unit tests and functional integration tests.
@@ -535,14 +543,14 @@ and will be skipped by default.
535543
If you don't have access to a running Redis server, you can also use a temporary `Redis` Docker image:
536544

537545
```bash
538-
$ docker run --net=host redis
546+
docker run --net=host redis
539547
```
540548

541549
To now run the functional tests, you need to supply *your* login
542550
details in an environment variable like this:
543551

544552
```bash
545-
$ REDIS_URI=localhost:6379 vendor/bin/phpunit
553+
REDIS_URI=localhost:6379 vendor/bin/phpunit
546554
```
547555

548556
## License

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
},
2222
"require-dev": {
2323
"clue/block-react": "^1.5",
24-
"phpstan/phpstan": "1.9.2 || 1.4.10",
25-
"phpunit/phpunit": "^9.5 || ^7.5"
24+
"phpstan/phpstan": "1.10.15 || 1.4.10",
25+
"phpunit/phpunit": "^9.6 || ^7.5"
2626
},
2727
"autoload": {
2828
"psr-4": { "Clue\\React\\Redis\\": "src/" }

phpunit.xml.dist

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with new format for PHPUnit 9.5+ -->
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
77
cacheResult="false"
88
colors="true"
@@ -20,7 +20,7 @@
2020
<php>
2121
<ini name="error_reporting" value="-1" />
2222
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
23-
<!-- <ini name="zend.assertions=1" value="1" /> -->
23+
<!-- <ini name="zend.assertions" value="1" /> -->
2424
<ini name="assert.active" value="1" />
2525
<ini name="assert.exception" value="1" />
2626
<ini name="assert.bail" value="0" />

phpunit.xml.legacy

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<php>
1919
<ini name="error_reporting" value="-1" />
2020
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
21-
<!-- <ini name="zend.assertions=1" value="1" /> -->
21+
<!-- <ini name="zend.assertions" value="1" /> -->
2222
<ini name="assert.active" value="1" />
2323
<ini name="assert.exception" value="1" />
2424
<ini name="assert.bail" value="0" />

0 commit comments

Comments
 (0)