parsing data out of files that contain items from a store, you should be able to retrieve specific pieces of the data
- Clone the repo using
git clone https://github.com/aonamrata/FileParser.git
- Install composer if it is not already installed from https://getcomposer.org/download/
cd FileParser
- Run composer to install all dependencies using this cmd from root dir :
composer install
. This will create vendor folder with all required libraries. - Run a test using this cmd from root dir
php scripts/fileParser.php
-- It should giveInvalid option passed!!
and not Fatal error.
sh runExamples.sh
php scripts/fileParser.php <file> find-by-id <id>
- *Example: *
php scripts/fileParser.php "items.csv" find-by-id 72-Bx-hb21
php scripts/fileParser.php <file> find-all
- *Example: *
php scripts/fileParser.php "items.csv" find-all
php scripts/fileParser.php <file> find-by-category <cat-id>
- *Example: *
php scripts/fileParser.php "items.csv" find-by-category a
$ ../vendor/bin/phpunit phpunit/