Skip to content

Commit

Permalink
Add php_codesniffer and run before tests. run vendor PHPUnit, too
Browse files Browse the repository at this point in the history
  • Loading branch information
terite committed Apr 7, 2014
1 parent 73f0145 commit 0b7de5c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ before_script:
- composer self-update
- composer install --dev

script: phpunit
script: make sniff test
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
vendor/autoload.php:
composer install

.PHONY: sniff
sniff: vendor/autoload.php
vendor/bin/phpcs --standard=PSR2 src -n

.PHONY: test
test: vendor/autoload.php
vendor/bin/phpunit
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"php": ">=5.3.3"
},
"require-dev": {
"phpunit/phpunit": "4.0.*"
},
"phpunit/phpunit": "4.0.*",
"squizlabs/php_codesniffer": "~1.5"
},
"autoload": {
"psr-0": {
"Faker": "src/",
Expand Down

0 comments on commit 0b7de5c

Please sign in to comment.