/simple-tdd-template-php

A simple TDD enviroment for PHP with sample test

Primary LanguagePHP

A simple enviroment for PHP TDD

A simple skeleton project to test PHP with PHPUnit.

First Steps

  • Download/Clone the repository

I have included a simple math test just to show its working. This is what I use for my PHP TDD.

Create your own tests.

You create the PHPUnit test in the tests directory and the clss for the functions in src folder.

Run tests

  • Open root folder in the terminal/command prompt
  • php vendor/bin/phpunit tests --color

Requirements

  • PHP 8
  • Composer