PHP code example of forevermatt / readable-unit-tests-php

1. Go to this page and download the library: Download forevermatt/readable-unit-tests-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

forevermatt / readable-unit-tests-php example snippets


php run-tests.php sample/src

php generate-test-files.php sample/src

- sample
  - src/
    - Calculator.php (PHP class to be tested)
  - tests/
    - unit/
      - Calculator.test (Gherkin)
      - CalculatorTest.php (PHP implementation of test steps)