Browse Source

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`.
Mark Story 9 years ago
parent
commit
489b5f8557
1 changed files with 9 additions and 0 deletions
  1. 9 0
      composer.json

+ 9 - 0
composer.json

@@ -69,5 +69,14 @@
         "cakephp/orm": "self.version",
         "cakephp/utility": "self.version",
         "cakephp/validation": "self.version"
+    },
+    "scripts": {
+        "check": [
+            "@cs-check",
+            "@test"
+        ],
+        "cs-check": "vendor/bin/phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
+        "cs-fix": "vendor/bin/phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
+        "test": "vendor/bin/phpunit --colors=always"
     }
 }