https://github.com/graillus/php-symfony-tests
Test tools configuration template for Symfony projects.
https://github.com/graillus/php-symfony-tests
Last synced: 4 months ago
JSON representation
Test tools configuration template for Symfony projects.
- Host: GitHub
- URL: https://github.com/graillus/php-symfony-tests
- Owner: graillus
- License: wtfpl
- Created: 2016-06-10T17:12:01.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-10T17:21:56.000Z (about 10 years ago)
- Last Synced: 2025-03-05T09:36:32.276Z (over 1 year ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Symfony tests
Test tools configuration template for Symfony projects.
Run all your tests and static code analysis tools in just one command.
Included tools are phpunit, phpcs, phploc, phpcpd, phpmd.
## Requirements
- You need to have **composer** installed globally
- **xdebug** extension should be enabled
- You may have **phing** installed globally instead of using the dependency
## Setup
- Add the following packages int your ```composer.json``` :
```json
"require-dev": {
"phing/phing": "^2.14",
"phpunit/phpunit": "^5.4",
"phpmd/phpmd": "^2.4",
"phploc/phploc": "^3.0",
"sebastian/phpcpd": "^2.0",
"squizlabs/php_codesniffer": "^2.6"
}
```
- Copy all the content of the */files* directory at the root of your project
- Run
```bash
$ composer install
```
That's it, you're now ready to launch static code analysis tools, and unit tests
## Usage
If you don't have phing installed globally:
```bash
$ alias phing=vendor/bin/phing
```
Launch all unit tests + static code analysis
```bash
$ phing
```
Launch unit tests only
```bash
$ phing unit
```
List available tasks:
```bash
$ phing -l
```
## TODO
- Add docker integration to run tests in containers
- Add behavioual tests
## License
WTFPL v2

See the LICENSE file.