Skip to content

Commit 17a89a2

Browse files
committed
Add test tasks
1 parent 3efe417 commit 17a89a2

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
- run: composer install
2323
- env:
2424
DETECTLANGUAGE_API_KEY: ${{ secrets.DETECTLANGUAGE_API_KEY }}
25-
run: bin/phpunit
25+
run: composer test

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"php": ">=5.3.0"
1616
},
1717
"require-dev": {
18+
"phpunit/phpunit": "^9.6",
1819
"yoast/phpunit-polyfills": "^1.0"
1920
},
2021
"config": {
@@ -24,5 +25,9 @@
2425
"psr-0": {
2526
"DetectLanguage": "lib/"
2627
}
28+
},
29+
"scripts": {
30+
"test": "php -d memory_limit=512M vendor/phpunit/phpunit/phpunit",
31+
"test-silent": "php -d memory_limit=512M -d error_reporting='E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED' vendor/phpunit/phpunit/phpunit"
2732
}
2833
}

mise.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22

33
[env]
44
_.file = ".env.local"
5+
6+
[tasks]
7+
test = "composer test"
8+
test-silent = "composer test-silent"
9+

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" convertDeprecationsToExceptions="false">
33
<coverage>
44
<include>
55
<directory suffix=".php">./lib/DetectLanguage/</directory>

0 commit comments

Comments
 (0)