This repository shows a basic setup for a command line 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 https://getcomposer.org/download/
After cloning this repository, change into the newly created directory and run
composer install
This will install all dependencies needed for the project.
All tests can be run by executing
vendor/phpunit/phpunit/phpunit
phpunit
will automatically find all tests inside the tests
directory and run them based on the configuration in the phpunit.xml
file.
The test for class Greeting
is only verifying the return value of one method.
To run the application execute bin/hello.php "World"
or php hello.php "World"
.
You should see the text “Hello World” being printed.
$: bin/hello.php "World"
Hello World
This project is licensed under the MIT License - see the LICENCE.md file for details.