Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



21 Commits

Repository files navigation

MyTEST Project


This repository is my first (serious) attempt to create, step-by-step, a basic PHPUnit testing application. This code it is not useful to anyone looking for a PHPUnit testing wrapper, it is just simple example of installing and using PHPUnit.

Programming Languages

Main programming language:

  • PHP


Below are the steps to produce this example PHPUnit application:

  • Copy the files to root folder of your server (e.g. htdocs, www )
  • Install PHPUnit (here the version for Windows was used) following the instructions here: PHPUnit installation for Windows
  • Install Composer (again the windows version is used here) following the instructions here: Composer for Windows
  • Create a json file in the root directory with name 'composer.json' open it and add the following:
    "require-dev": {
        "phpunit/phpunit": "6.1"
  • PHPUnit version is the latest stable at the time of writing this code (of course you can modify the PHPUnit version)
  • Then via command line and using composer install PHPUnit with the command (from the root folder):
$ composer install
  • From that point you are ready to create your application classes and test them with PHPUnit
  • For this sample code the "classes" folder includes the apllication's classes and the folder "testing" the PHPUnit testing classes
  • For calling the test class execute the following:
$ phpunit ClassNameTest

Test Environment

  • Apache 2.4.23
  • PHP 7.0.10

About me