Dr. Strangetest

Or: How I Learned To Stop Worrying And Test The Code

A testing framework for PHP

Getting Started

Requirements

Dr. Strangetest supports PHP versions 5.3 through 8.1.

For PHP 7 or later, zend.assertions must NOT be in production mode.

Installation

Phar (PHP Archive)

Dr. Strangetest is available as a Phar. PHP must have the Phar extension enabled. phar.readonly and phar.require_hash can be set to their default value of "1".

Place the Phar in your project's root directory and run it as follows:

$ php strangetest.phar

If you make the Phar executable you can run it directly:

$ ./strangetest.phar

Composer

Install Dr. Strangetest using Composer:

$ composer require --dev dr-strangetest/dr-strangetest=*

Composer installs the strangetest executable in its bin-dir (which defaults to vendor/bin), which you can run as follows:

$ composer exec -- strangetest

Verifying Installation

If all went well, you now have Dr. Strangetest's executable somewhere in your project path. From hereon, references to strangetest refer to the location of this executable.

You can verify installation succeeded by trying to run the executable:

$ strangetest --version
Dr. Strangetest 0.1.0