Skip to content

Commit

Permalink
Merge pull request #65 from clue-labs/update-tests
Browse files Browse the repository at this point in the history
Update test suite and report failed assertions
  • Loading branch information
SimonFrings authored Apr 13, 2023
2 parents 89f2602 + b6a0b5c commit 23dd72c
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ jobs:
- 5.5
- 5.4
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: sqlite3
coverage: xdebug
ini-file: development
- run: composer install
- run: vendor/bin/phpunit --coverage-text
if: ${{ matrix.php >= 7.3 }}
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# clue/reactphp-sqlite

[![CI status](https://github.com/clue/reactphp-sqlite/workflows/CI/badge.svg)](https://github.com/clue/reactphp-sqlite/actions)
[![CI status](https://github.com/clue/reactphp-sqlite/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-sqlite/actions)
[![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)

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

```bash
$ composer require clue/reactphp-sqlite:^1.5
composer require clue/reactphp-sqlite:^1.5
```

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

```bash
$ sudo apt install php-sqlite3
sudo apt install php-sqlite3
```

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

```bash
$ composer install
composer install
```

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

```bash
$ vendor/bin/phpunit
vendor/bin/phpunit
```

## License
Expand Down
10 changes: 7 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@
"react/promise": "^3 || ^2.7 || ^1.2.1"
},
"require-dev": {
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8.35"
"phpunit/phpunit": "^9.6 || ^5.7 || ^4.8.36"
},
"autoload": {
"psr-4": { "Clue\\React\\SQLite\\": "src/" }
"psr-4": {
"Clue\\React\\SQLite\\": "src/"
}
},
"autoload-dev": {
"psr-4": { "Clue\\Tests\\React\\SQLite\\": "tests/" }
"psr-4": {
"Clue\\Tests\\React\\SQLite\\": "tests/"
}
}
}
13 changes: 9 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- PHPUnit configuration file with new format for PHPUnit 9.3+ -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
<!-- PHPUnit configuration file with new format for PHPUnit 9.6+ -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
cacheResult="false"
colors="true"
convertDeprecationsToExceptions="true">
<testsuites>
<testsuite name="SQLite React Test Suite">
Expand All @@ -20,5 +20,10 @@
</coverage>
<php>
<ini name="error_reporting" value="-1" />
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
<!-- <ini name="zend.assertions" value="1" /> -->
<ini name="assert.active" value="1" />
<ini name="assert.exception" value="1" />
<ini name="assert.bail" value="0" />
</php>
</phpunit>
10 changes: 9 additions & 1 deletion phpunit.xml.legacy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- PHPUnit configuration file with old format for PHPUnit 9.2 or older -->
<!-- PHPUnit configuration file with old format for legacy PHPUnit -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
bootstrap="vendor/autoload.php"
Expand All @@ -16,4 +16,12 @@
<directory>./src/</directory>
</whitelist>
</filter>
<php>
<ini name="error_reporting" value="-1" />
<!-- Evaluate assertions, requires running with "php -d zend.assertions=1 vendor/bin/phpunit" -->
<!-- <ini name="zend.assertions" value="1" /> -->
<ini name="assert.active" value="1" />
<ini name="assert.exception" value="1" />
<ini name="assert.bail" value="0" />
</php>
</phpunit>

0 comments on commit 23dd72c

Please sign in to comment.