Run PHPUnit on composer projects

I am working on a lib for composer/packagist.

While working on the PHP classes,I am parallely writing the tests for the method, to check if everything works well.

file tree:

├── composer.json
├── composer.lock
├── src
│   └── Resizer.php
├── tests
│   └── ResizerTests.php
└── vendor
    └── PHPUnit etc...


    "name": "eschmid1972/image-resizer",
    "description": "Library for resizing images with custom options",
    "keywords": [
    "license": "BSD-3"
    "require": {},
    "require-dev": {
        "phpunit/phpunit": "~4.0"

What do I need to do, so I can run the tests with the command phpunit
in the project root?

I’ve found the solution: you need to create a phpunit.xml
file in the project root or the directory where you want to execute phpunit

The documentation for the configuration is hosted at:

Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 综合编程 » Run PHPUnit on composer projects

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录