PHP5 Unit Testing Framework
PHP JavaScript Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
addons
core is_array assertion added Dec 3, 2010
tests
LICENSE added ref to YAHOO to license file Aug 28, 2008
README.markdown added links for readme to reflect github home Jul 20, 2009
constants.php
getoptx.sh
snaptest.php
snaptest.sh fix to allow spaces in filenames (osx compatibility fix) Jun 8, 2009
snaptest_web.dist.php changed from blowfish to just full path prefix removal. This is a muc… Jul 4, 2009
snaptest_webcore.php

README.markdown

README - SnapTest

Core Branch: http://github.com/Jakobo/snaptest/tree/master

Issues: http://github.com/Jakobo/snaptest/issues

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

Place Snap wherever you want, and run a self test:

  1. 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.
  2. if php is not in an obvious location, you can run ./snaptest.sh ./ --php where indicates the location of your php binary.
  3. 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 http://wiki.github.com/Jakobo/snaptest/base-unit-test-class 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)