Skip to content

Commit

Permalink
Add some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
BackEndTea committed Jun 26, 2019
1 parent 100ea7e commit 042d16f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Watch Phpunit

## What is this
The intention of this application is to 'watch' for file changes,
and run the tests related to those files.

In its current implementation it does so very naively.
The app can be ran with two options, the source folder to watch, and the test folder.
If any of the files in these folder change it will attempt to run the tests.

If the file is in the test folder it will simply run phpunit with that test.
If the file is int he source folder, then it will look for the file as follows:

```diff
+ src/Folder/FileThatChanged.php
- tests/Folder/FileThatChangedTest.php
```


## Usage
```
$ vendor/bin/watch-phpunit watch --src ./src --test ./tests
```
(src and tests are the default values, so if your folder structure matches this, you can run it like so:)
```
$ vendor/bin/watch-phpunit watch
```
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
"psr-4": {
"Watcher\\Test\\": "tests/"
}
}
},
"bin": ["bin/watch-phpunit"]
}

0 comments on commit 042d16f

Please sign in to comment.