This repository shows a basic setup for a PHP package or application in PHP.
PHP 7 or above and Composer is expected to be installed on our system.
For instructions on how to install Composer visit getcomposer.org.
After cloning this repository, change into the newly created directory and run
composer install
or if you have installed Composer locally in your current directory
php composer.phar install
This will install all dependencies needed for the project.
All tests can be run by executing
vendor/bin/phpunit
phpunit
will automatically find all tests inside the test
directory and run them based on the configuration in the phpunit.xml
file.
The test for the class Greeting
verifies that the return value of the sayHello
method returns the string "Hello {name}", where {name} is the value passed through to the constructor.
PHP has an in-built server for local development. This can be started by executing
php -S localhost:8000 -t public
Then open your browser at http://localhost:8000/example.php
You should see the text "Hello Ada Lovelace" on your screen.
This project is licensed under the MIT License - see the LICENCE.md file for details.