Make testing easier

This commit is contained in:
Fonata
2021-04-02 19:11:37 +02:00
committed by Fonata
parent 9c35237b1b
commit 0e54a2b9fa
3 changed files with 18 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
*.bak
/.idea
/coverage_clover.xml
/phive.xml
/tools
composer.lock

View File

@@ -161,6 +161,18 @@ $csv->output('movies.csv', $data_array, $header, ',');
For more complex examples, see the ``tests`` and `examples` directories.
## Test coverage
All tests are located in the `tests` directory. To execute tests, run the following commands:
````bash
composer install
composer run test
````
When pushing code to GitHub, tests will be executed using Travis CI. The relevant configuration is in the
file `.travis.yml`.
## Credits
* ParseCsv is based on the concept of [Ming Hong Ng][ming]'s [CsvFileParser][]

View File

@@ -45,6 +45,11 @@
"dev-master": "1.0.x-dev"
}
},
"scripts": {
"test": [
"vendor/bin/phpunit -c tests tests --disallow-test-output --coverage-clover coverage_clover.xml --whitelist src"
]
},
"support": {
"issues": "https://github.com/parsecsv/parsecsv-for-php/issues",
"source": "https://github.com/parsecsv/parsecsv-for-php"