https://github.com/nkdas91/getting-started-with-phpunit
PHPUnit Examples
https://github.com/nkdas91/getting-started-with-phpunit
phpunit
Last synced: about 2 months ago
JSON representation
PHPUnit Examples
- Host: GitHub
- URL: https://github.com/nkdas91/getting-started-with-phpunit
- Owner: nkdas91
- License: mit
- Created: 2021-03-21T13:20:34.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-19T01:15:21.000Z (about 4 years ago)
- Last Synced: 2025-02-13T13:49:19.618Z (3 months ago)
- Topics: phpunit
- Language: PHP
- Homepage: https://neerajdas.com/blog/getting-started-with-phpunit
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Getting started with PHPUnit
PHPUnit examples in support of my blog:
https://neerajdas.com/blog/getting-started-with-phpunitSetup:
1. Clone / Download: https://github.com/nkdas91/Getting-started-with-PHPUnit.git
2. Copy ```env.example.php``` to ```env.php``` and replace default values.
3. Create a DB ```phpunit``` and import ```sql/phpunit.sql```
4. Update ```ABSOLUTE_PATH_TO_DOCUMENT_ROOT``` in ```phpunit.xml```.
5. Run ```composer install``` in the root directory.
6. Run ```XDEBUG_MODE=coverage ./vendor/bin/phpunit``` to run unit tests and generate Code Coverage.