php|architect - June 2013 by php|architect

php|architect - June 2013 by php|architect

Author:php|architect
Language: eng
Format: epub
Publisher: php|architect
Published: 2013-06-27T04:00:00+00:00


Watching Files

The two lines that start with watch in the configuration code above are what tells Guard which files it should monitor. The first one makes it check files that ends with Test.php in the tests folder. When one of those file changes, Guard runs PHPUnit for this file.

The second line makes Guard monitor the src folder. When a file is changed, Guard will run the tests associated to that file in the tests folder. It uses regular expressions to match files and allows capturing part of the file’s path. If the file src/Foo/Bar.php is modified, the regex will capture Foo/Bar and use it to tell Guard to run the tests in tests/Foo/BarTest.php.

Now if you go into a terminal and run guard, you will get something like Figure 1.

Figure 1: Running Guard Keeping Guard Fast



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.