Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.24 KB

File metadata and controls

55 lines (36 loc) · 1.24 KB

Setting Up

You will need to install PHP v8.0 or later, there are multiple ways of achieving this depending on the machine you are using.

Mac

  • If you have previously installed brew, run the following in a new terminal prompt:
brew install php
  • Otherwise, follow the instructions here to install brew and PHP at the same time.

Windows

  • Follow the instructions here.

Installing dependencies

Once PHP is installed, you will need to install the dependencies from composer (which is PHP's package manager ala npm). To do this:

  • Open a new terminal prompt pointing to this repository
  • Navigate to exercises/php, e.g.
cd exercises/php/
  • Run the following PHP command:
php composer.phar install

Running tests

  • Open a new terminal prompt pointing to this repository
  • Navigate to exercises/php, e.g.
cd exercises/php/
  • Run the following command:
./vendor/bin/phpunit --testdox tests

You should see an output with the tests that have run and how many passed/failed, no tests should fail so let someone know if they do!