Skip to content

Commit 1e71cc4

Browse files
authored
chore: use Pest to run tests (#97)
1 parent 8db748f commit 1e71cc4

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
- name: Install
1818
run: composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable --no-suggest
1919
- name: Unit tests
20-
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-text
20+
run: composer test
2121
- name: Codecov
2222
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ composer.lock
22
phpunit.xml
33
vendor
44
clover.xml
5-
.phpunit.result.cache
5+
.phpunit.result.cache
6+
.coverage
7+
coverage.xml

composer.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
},
1616
"require-dev": {
1717
"friendsofphp/php-cs-fixer": "^2.16",
18-
"phpunit/phpunit": "^9.0.0"
18+
"pestphp/drift": "^0.3.0",
19+
"pestphp/pest": "^0.3.8",
20+
"phpunit/phpunit": "^9.3.10"
1921
},
2022
"suggest": {
2123
"ext-mbstring": "If ext-mbstring is not available you MUST install symfony/polyfill-mbstring"
@@ -38,5 +40,13 @@
3840
"branch-alias": {
3941
"dev-master": "1.0-dev"
4042
}
43+
},
44+
"scripts": {
45+
"format": [
46+
"vendor/bin/php-cs-fixer fix"
47+
],
48+
"test": [
49+
"./vendor/bin/pest --coverage --min=100 --coverage-html=.coverage --coverage-clover=coverage.xml"
50+
]
4151
}
4252
}

tests/Helpers.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
namespace Tests;
4+
5+
// ..

tests/Pest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
use ArkEcosystem\Tests\Client\TestCase;
4+
5+
uses(TestCase::class)->in(__DIR__);

0 commit comments

Comments
 (0)