Prerequistits At the time of running this project PHP version 7.3 Composer 2.1
Setup
We have two directories iprice-string-utilities
, iprice-test
iprice-string-utilites is a dependency for iprice-test we need to setup both in order to run cli.
- Navigate to
iprice-string-utilitites
and run the following command in terminal/command promptcomposer install
- Navigate to iprice-test and do the same
composer install
- Now we are ready to run the application
Steps to run
cd iprice-test
then
php index.php [-l | -u | -a] | [-c] -v "input"
Example:
php index.php -l -c -v "soMeRandomString"
php index.php -u -c -v "soMeRandomString"
php index.php -a -c -v "soMeRandomString"
php index.php -l -v "soMeRandomString"
Available options
-l convert to lowercase
-u convert to uppercase
-a convert to alternate case
-c
is an optional if we want to generate csv in root folder we will add this optional flag
Unit Testing
Navigate to iprice-string-utilitites
and run the following command.
./vendor/bin/phpunit --testdox tests