Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Run tests using Composer instead of Grunt
Browse files Browse the repository at this point in the history
  • Loading branch information
tuupola committed Dec 10, 2016
1 parent 50deeb2 commit 05258df
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 71 deletions.
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ When contributing to open source project it is polite to follow the original aut

## Running Tests

You can run tests either manually...
You can run individual tests either manually...

``` bash
$ vendor/bin/phpunit
$ vendor/bin/phpcs --standard=PSR2 src/ -p
$ composer phplint
$ composer phpcs
$ composer phpunit
```

... or automatically on every code change.
... or automatically on every code change. You will need [entr](http://entrproject.org/) for this to work.

``` bash
$ npm install
$ grunt watch
$ composer watch
```
43 changes: 0 additions & 43 deletions Gruntfile.js

This file was deleted.

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,18 +385,18 @@ $app->add(new \Tuupola\Middleware\JwtAuthentication([

## Testing

You can run tests either manually...
You can run individual tests either manually...

``` bash
$ vendor/bin/phpunit
$ vendor/bin/phpcs --standard=PSR2 src/ -p
$ composer phplint
$ composer phpcs
$ composer phpunit
```

... or automatically on every code change.
... or automatically on every code change. You will need [entr](http://entrproject.org/) for this to work.

``` bash
$ npm install
$ grunt watch
$ composer watch
```

## Contributing
Expand Down
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,12 @@
"psr-4": {
"Tuupola\\Middleware\\": "tests"
}
},
"scripts": {
"test": "composer phplint && composer phpcs && composer phpunit",
"phpcs": "vendor/bin/phpcs --standard=PSR2 --extensions=php --ignore=*/vendor/*,*/tests/* . -p",
"phpunit": "vendor/bin/phpunit --coverage-text --coverage-html ./report",
"phplint": "env phplint '**/*.php' '!vendor/**'",
"watch": "find . -name \"*.php\" -not -path \"./vendor/*\" -o -name \"*.json\" -not -path \"./vendor/*\"| entr -c composer test"
}
}
16 changes: 0 additions & 16 deletions package.json

This file was deleted.

0 comments on commit 05258df

Please sign in to comment.