Skip to content

vanilla-project/php-command-line

 
 

Repository files navigation

Vanilla PHP Command Line Project

This repository shows a basic setup for a command line application in PHP.

Getting Started

PHP 7 or above and Composer is expected to be installed on our system.

Installing Composer

For instructions on how to install Composer visit https://getcomposer.org/download/

Installing

After cloning this repository, change into the newly created directory and run

composer install

This will install all dependencies needed for the project.

Running the Tests

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.

Testing Approach

The test for class Greeting is only verifying the return value of one method.

Running the Application

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

Built With

License

This project is licensed under the MIT License - see the LICENCE.md file for details.

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%