Skip to content

Commit 23dd72c

Browse files
authored
Merge pull request #65 from clue-labs/update-tests
Update test suite and report failed assertions
2 parents 89f2602 + b6a0b5c commit 23dd72c

File tree

5 files changed

+32
-14
lines changed

5 files changed

+32
-14
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ jobs:
2626
- 5.5
2727
- 5.4
2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v3
3030
- uses: shivammathur/setup-php@v2
3131
with:
3232
php-version: ${{ matrix.php }}
3333
extensions: sqlite3
3434
coverage: xdebug
35+
ini-file: development
3536
- run: composer install
3637
- run: vendor/bin/phpunit --coverage-text
3738
if: ${{ matrix.php >= 7.3 }}

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# clue/reactphp-sqlite
22

3-
[![CI status](https://github.com/clue/reactphp-sqlite/workflows/CI/badge.svg)](https://github.com/clue/reactphp-sqlite/actions)
3+
[![CI status](https://github.com/clue/reactphp-sqlite/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-sqlite/actions)
44
[![installs on Packagist](https://img.shields.io/packagist/dt/clue/reactphp-sqlite?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/reactphp-sqlite)
55

66
Async SQLite database, lightweight non-blocking process wrapper around file-based database extension (`ext-sqlite3`),
@@ -438,7 +438,7 @@ This project follows [SemVer](https://semver.org/).
438438
This will install the latest supported version:
439439

440440
```bash
441-
$ composer require clue/reactphp-sqlite:^1.5
441+
composer require clue/reactphp-sqlite:^1.5
442442
```
443443

444444
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
@@ -452,7 +452,7 @@ PHP extension, so you'll have to make sure that you have a suitable version
452452
installed. On Debian/Ubuntu-based systems, you may simply install it like this:
453453

454454
```bash
455-
$ sudo apt install php-sqlite3
455+
sudo apt install php-sqlite3
456456
```
457457

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

463463
```bash
464-
$ composer install
464+
composer install
465465
```
466466

467467
To run the test suite, go to the project root and run:
468468

469469
```bash
470-
$ vendor/bin/phpunit
470+
vendor/bin/phpunit
471471
```
472472

473473
## License

composer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@
1919
"react/promise": "^3 || ^2.7 || ^1.2.1"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
22+
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
2323
},
2424
"autoload": {
25-
"psr-4": { "Clue\\React\\SQLite\\": "src/" }
25+
"psr-4": {
26+
"Clue\\React\\SQLite\\": "src/"
27+
}
2628
},
2729
"autoload-dev": {
28-
"psr-4": { "Clue\\Tests\\React\\SQLite\\": "tests/" }
30+
"psr-4": {
31+
"Clue\\Tests\\React\\SQLite\\": "tests/"
32+
}
2933
}
3034
}

phpunit.xml.dist

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
3+
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
7-
colors="true"
87
cacheResult="false"
8+
colors="true"
99
convertDeprecationsToExceptions="true">
1010
<testsuites>
1111
<testsuite name="SQLite React Test Suite">
@@ -20,5 +20,10 @@
2020
</coverage>
2121
<php>
2222
<ini name="error_reporting" value="-1" />
23+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
24+
<!-- <ini name="zend.assertions" value="1" /> -->
25+
<ini name="assert.active" value="1" />
26+
<ini name="assert.exception" value="1" />
27+
<ini name="assert.bail" value="0" />
2328
</php>
2429
</phpunit>

phpunit.xml.legacy

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<!-- PHPUnit configuration file with old format for PHPUnit 9.2 or older -->
3+
<!-- PHPUnit configuration file with old format for legacy PHPUnit -->
44
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
55
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
66
bootstrap="vendor/autoload.php"
@@ -16,4 +16,12 @@
1616
<directory>./src/</directory>
1717
</whitelist>
1818
</filter>
19+
<php>
20+
<ini name="error_reporting" value="-1" />
21+
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
22+
<!-- <ini name="zend.assertions" value="1" /> -->
23+
<ini name="assert.active" value="1" />
24+
<ini name="assert.exception" value="1" />
25+
<ini name="assert.bail" value="0" />
26+
</php>
1927
</phpunit>

0 commit comments

Comments
 (0)