Skip to content

Commit 58ca161

Browse files
Merge pull request #24 from stevegrunwell/refactor/test-scaffolding
Rework the test scaffolding
2 parents d79e2c4 + d84808b commit 58ca161

File tree

7 files changed

+162
-104
lines changed

7 files changed

+162
-104
lines changed

.github/workflows/unit-tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Unit Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run:
7+
runs-on: ${{ matrix.operating-system }}
8+
strategy:
9+
matrix:
10+
operating-system: [ubuntu-latest]
11+
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
12+
name: PHP ${{ matrix.php-versions }}
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v1
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
if: ${{ matrix.php != '7.4' }}
21+
with:
22+
php-version: ${{ matrix.php-versions }}
23+
coverage: none
24+
25+
- name: Get composer cache directory
26+
id: composer-cache
27+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
28+
29+
- name: Cache dependencies
30+
uses: actions/cache@v2
31+
with:
32+
path: ${{ steps.composer-cache.outputs.dir }}
33+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
34+
restore-keys: ${{ runner.os }}-composer-
35+
36+
- name: Install dependencies
37+
run: composer install --no-interaction --prefer-dist --no-suggest --no-progress
38+
39+
- name: Run test suite
40+
if: ${{ matrix.php != '7.4' }}
41+
run: composer test

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
composer.lock
21
tests/coverage
32
vendor
3+
.phpunit.result.cache
4+
5+
# The composer.lock file is not needed, as this is a library whose dependencies
6+
# will depend on the version of PHP being used.
7+
composer.lock

.travis.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# PHPUnit Markup Assertions
22

3-
[![Build Status](https://travis-ci.org/stevegrunwell/phpunit-markup-assertions.svg?branch=develop)](https://travis-ci.org/stevegrunwell/phpunit-markup-assertions)
4-
[![Coverage Status](https://coveralls.io/repos/github/stevegrunwell/phpunit-markup-assertions/badge.svg?branch=develop)](https://coveralls.io/github/stevegrunwell/phpunit-markup-assertions?branch=develop)
3+
![Build Status](https://github.com/stevegrunwell/phpunit-markup-assertions/workflows/Unit%20Tests/badge.svg)
54
[![GitHub release](https://img.shields.io/github/release/stevegrunwell/phpunit-markup-assertions.svg)](https://github.com/stevegrunwell/phpunit-markup-assertions/releases)
65

76
This library introduces the `MarkupAssertionsTrait` trait for use in [PHPUnit](https://phpunit.de) tests.

composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"laminas/laminas-dom": "^2.7"
1919
},
2020
"require-dev": {
21-
"phpunit/phpunit": "^6.0"
21+
"symfony/phpunit-bridge": "^5.2"
2222
},
2323
"autoload": {
2424
"psr-4": {
@@ -32,10 +32,10 @@
3232
},
3333
"scripts": {
3434
"test": [
35-
"phpunit"
35+
"simple-phpunit --testdox"
3636
],
3737
"test-coverage": [
38-
"phpunit --coverage-html=tests/coverage"
38+
"phpdbg -qrr -d memory_limit=-1 ./vendor/bin/simple-phpunit --coverage-html=tests/coverage --colors=always"
3939
]
4040
},
4141
"scripts-descriptions": {
@@ -45,6 +45,8 @@
4545
"config": {
4646
"preferred-install": "dist",
4747
"sort-packages": true,
48-
"optimize-autoloader": true
48+
"platform": {
49+
"php": "7.4"
50+
}
4951
}
5052
}

0 commit comments

Comments
 (0)