Skip to content

Commit

Permalink
test: add tests using testbench
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfvandekrol committed Nov 21, 2023
1 parent 37423fb commit 2249e32
Show file tree
Hide file tree
Showing 15 changed files with 1,113 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
/art export-ignore
/docs export-ignore
/tests export-ignore
/workbench export-ignore
/.editorconfig export-ignore
/.php_cs.dist.php export-ignore
/psalm.xml export-ignore
/psalm.xml.dist export-ignore
/testbench.yaml export-ignore
/UPGRADING.md export-ignore
/phpstan.neon.dist export-ignore

33 changes: 26 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,31 @@
}
},
"scripts": {
"post-autoload-dump": "@composer run prepare",
"post-autoload-dump": [
"@clear",
"@prepare",
"@composer run prepare"
],
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": [
"@composer run prepare",
"@php vendor/bin/testbench workbench:build --ansi"
],
"build": "@php vendor/bin/testbench workbench:build --ansi",
"start": [
"Composer\\Config::disableProcessTimeout",
"@composer run build",
"@php vendor/bin/testbench serve"
],
"analyse": "vendor/bin/phpstan analyse",
"format": "vendor/bin/pint"
"test": "vendor/bin/phpunit",
"format": "vendor/bin/pint",
"serve": [
"Composer\\Config::disableProcessTimeout",
"@build",
"@php vendor/bin/testbench serve"
],
"lint": [
"@php vendor/bin/pint",
"@php vendor/bin/phpstan analyse"
]
},
"extra": {
"laravel": {
Expand All @@ -70,5 +81,13 @@
}
},
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/",
"Workbench\\App\\": "workbench/app/",
"Workbench\\Database\\Factories\\": "workbench/database/factories/",
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/"
}
}
}
2 changes: 2 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ parameters:
- config
- database
- src
- tests
- workbench
tmpDir: build/phpstan
checkMissingIterableValueType: false
7 changes: 0 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
Expand Down
Loading

0 comments on commit 2249e32

Please sign in to comment.