PHPackages                             chrisguitarguy/simpleunit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. chrisguitarguy/simpleunit

ActiveLibrary

chrisguitarguy/simpleunit
=========================

The simplest PHP unit testing framework

026PHP

Since Mar 29Pushed 12y ago1 watchersCompare

[ Source](https://github.com/chrisguitarguy/Simpleunit)[ Packagist](https://packagist.org/packages/chrisguitarguy/simpleunit)[ RSS](/packages/chrisguitarguy-simpleunit/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Simple Unit
===========

[](#simple-unit)

The simplest PHP unit testing framework. Uses only the PHP core and a little script.

### Writing Tests

[](#writing-tests)

create a directory called `tests` (or something else, more on that later). In the `tests` directory put files with names separated by underscores that describe what exactly the file is meant to be test. All test files should end with `_test.php`. See the `tests` directory in this repo examples.

Each file should, as you may have guessed, test a specific feature. Use PHP's [`assert`](http://php.net/manual/en/function.assert.php) function to verify expressions evaluate to true. Be sure to specify the second argument of assert to get nicer error messages.

```
