Every repository with this icon (
Every repository with this icon (
tree 21f5f201f548012d9339233eb334cf4cfe82f411
parent de550048bb3c5ef978be030f522b886af93725ba
| name | age | message | |
|---|---|---|---|
| |
LICENSE | ||
| |
README.markdown | ||
| |
addons/ | Mon Jan 14 11:07:27 -0800 2008 | |
| |
constants.php | Mon May 26 23:56:55 -0700 2008 | |
| |
core/ | ||
| |
getoptx.sh | Wed Jan 16 15:56:26 -0800 2008 | |
| |
snaptest.php | ||
| |
snaptest.sh | ||
| |
snaptest_web.dist.php | ||
| |
snaptest_webcore.php | ||
| |
tests/ |
README - SnapTest
Introduction
SnapTest is a powerful unit testing framework for PHP 5+, leveraging PHP's unique runtime language to simplify the unit test process without sacrificing the agility tests provide.
SnapTest is a free software project licensed under the Mozilla Public License.
NOTE Starting with SnapTest 1.2.0, SnapTest will be licensed under the BSD License.
Getting Started
(from http://code.google.com/p/snaptest/wiki/QuickStart)
Place Snap wherever you want, and run a self test:
- if you have php in an obvious location (path, /usr/bin, /usr/local/bin, /opt/local/bin), run the command ./snaptest.sh ./ from inside the snaptest directory.
- if php is not in an obvious location, you can run ./snaptest.sh ./ --php where indicates the location of your php binary.
- if shell scripting for whatever reason isn't working, you can also use the PHP binary directly by calling snaptest.php --path= ./ where is the location of your php binary.
When ran, you should see output like the following:
User@Host ~/snaptest> ./snaptest.sh ./
..............................................................................
.................
Total Cases: 37 Total Tests: 95 Total Pass: 95 Total Defects: 0 Total Failures: 0
If you don't get any failures (marked with an F followed by information about the error, you're ready to go!
From here, check out The Getting Started Guide Step 2 to start writing your own tests.
License
SnapTest < 1.2.0 is licensed under the Mozilla Public license (MPL)
SnapTest >= 1.2.0 is licensed under the new BSD License (please see LICENSE for full terms)








