Skip to content

Commit

Permalink
Add tests (#8)
Browse files Browse the repository at this point in the history
* Install sebkay/touchstone via Composer

* Add Composer script for setting up test suite

* Add test to check jobs get pushed to the database

* Add test to check jobs get pushed to database with a custom queue
  • Loading branch information
SebKay authored May 27, 2022
1 parent 24b192b commit 11094ad
Show file tree
Hide file tree
Showing 4 changed files with 3,365 additions and 255 deletions.
24 changes: 16 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"name": "sebkay/wp-queued-jobs",
"description": "A Laravel-like queue system for WordPress.",
"license": "MIT",
"authors": [
{
"name": "Seb Kay",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"WpQueuedJobs\\": "src/"
Expand All @@ -10,27 +16,29 @@
"inc/helpers.php"
]
},
"authors": [
{
"name": "Seb Kay",
"email": "[email protected]"
"autoload-dev": {
"psr-4": {
"WPTS\\Tests\\": "tests/"
}
],
},
"require": {
"php": ">=7.4|>=8.0",
"monolog/monolog": "<=2.4",
"monolog/monolog": "<=2.3.5",
"ramsey/uuid": "<=4.2.3"
},
"require-dev": {
"php-stubs/wordpress-globals": "^0.2.0",
"php-stubs/wordpress-stubs": "^5.9",
"phpstan/phpstan": "^1.7",
"sebkay/touchstone": "^1.3",
"spatie/ray": "^1.34",
"squizlabs/php_codesniffer": "^3.6"
},
"scripts": {
"lint": "./vendor/bin/phpcs ./ --extensions=php --standard=PSR12 --ignore=vendor/ --exclude=Generic.Files.LineLength,PSR1.Files.SideEffects",
"analyse": "vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=1G"
"lint": "./vendor/bin/phpcs ./ --extensions=php --standard=PSR12 --ignore=tests/,vendor/ --exclude=Generic.Files.LineLength,PSR1.Files.SideEffects",
"analyse": "vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=1G",
"tests:setup": "./vendor/bin/touchstone setup --db-host=127.0.0.1 --db-name=wp_testing_tests --db-user=root --skip-db-creation=false",
"tests:run": "./vendor/bin/touchstone test"
},
"config": {
"sort-packages": true
Expand Down
Loading

0 comments on commit 11094ad

Please sign in to comment.