Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
hoshomoh committed Sep 5, 2017
1 parent cc946ae commit 7f243de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@

### How to run

From the package root, run assignment using php built in server `php -S localhost:8000`, this would start the server at `localhost:8000`. Visit the URL from your browser and you should see the generated files at the root of the package.
From the package root, run `composer install` then using php built in server run `php -S localhost:8000`, this would start the server at `localhost:8000`. Visit the URL from your browser and you should see the generated files at the root of the package.
The `sample.csv` is at the root of the package. Generated files would also be saved there.

To run test make sure you have `PHPUNIT` installed on the test machine. Then run `phpunit` also from the root of the Package.

### Implementation

The `CsvConverter` and `CsvValidator` were written in isolation of each other so, that they can be used seperately if need arise. The `CsvConverter` expects a valid file path and an array of validation rule(s) and in turn an array of all, valid and invalid data can be accessed.
Expand Down Expand Up @@ -171,6 +169,10 @@ header('Content-Type: application/xml');
print($converter->toXml());
```

### Running Test's

Run `phpunit` from the root of the Package. This assumes you have ran `composer install`.

### Todo's

- Support for more validation rules `string`, `number`, `date`, `required`, `boolean`, `email`, `phone_number`, `ip_address`
Expand Down

0 comments on commit 7f243de

Please sign in to comment.