1

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 ├── README.md ├── src │   └── Resizer.php ├── tests │   └── ResizerTests.php └── vendor └── PHPUnit etc... 

composer.json:

{ "name": "eschmid1972/image-resizer", "description": "Library for resizing images with custom options", "keywords": [ "php", "image", "imagemagick", "resize" ], "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?

2 Answers 2

1

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:

https://phpunit.de/manual/current/en/appendixes.configuration.html

Sign up to request clarification or add additional context in comments.

Comments

0

You'd have to download it as phar distribution. Not via composer, where only vendor/bin/phpunit is available.

See PHPUnit installation.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.