-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
BackEndTea
committed
Jun 26, 2019
1 parent
100ea7e
commit 042d16f
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,5 +35,6 @@ | |
"psr-4": { | ||
"Watcher\\Test\\": "tests/" | ||
} | ||
} | ||
}, | ||
"bin": ["bin/watch-phpunit"] | ||
} |