Skip to content

Commit 489b5f8

Browse files
committed
Add scripts for testing/checking.
I saw this in a blog post from weierophinney and thought it was a pretty nice addition. It enables commands like `composer check` and `composer test`.
1 parent 2ca8fe1 commit 489b5f8

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

composer.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,14 @@
6969
"cakephp/orm": "self.version",
7070
"cakephp/utility": "self.version",
7171
"cakephp/validation": "self.version"
72+
},
73+
"scripts": {
74+
"check": [
75+
"@cs-check",
76+
"@test"
77+
],
78+
"cs-check": "vendor/bin/phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
79+
"cs-fix": "vendor/bin/phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
80+
"test": "vendor/bin/phpunit --colors=always"
7281
}
7382
}

0 commit comments

Comments
 (0)