8000 [PHPUnit bridge] -c option doesn't exactly mimic phpunit · Issue #35482 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[PHPUnit bridge] -c option doesn't exactly mimic phpunit #35482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
michaelthieulin opened this issue Jan 27, 2020 · 1 comment
Closed

[PHPUnit bridge] -c option doesn't exactly mimic phpunit #35482

michaelthieulin opened this issue Jan 27, 2020 · 1 comment

Comments

@michaelthieulin
Copy link

Symfony version(s) affected: >=4.3.9, >=4.4.1, >=5.0.1

Description
The following code improvement symfony/phpunit-bridge@e1ce169#diff-9e24f390757d0a3c9a52593d80e8678f does not manage the -c (or --configuration) option the same way as phpunit when a directory is passed

In the phpunit doc, we can read

--configuration, -c

Read configuration from XML file. See The XML Configuration File for more details.

If phpunit.xml or phpunit.xml.dist (in that order) exist in the current working directory and --configuration is not used, the configuration will be automatically read from that file.

If a directory is specified and if phpunit.xml or phpunit.xml.dist (in that order) exists in this directory, the configuration will be automatically read from that file.

When a directory is passed, a notice appear (in SF4.*).
PHP Notice: DOMDocument::load(): read of 8192 bytes failed with errno=21 Is a directory in vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 38

How to reproduce

Install a new project
composer create-project symfony/skeleton bug_app

Add the phpunit-bridge dependance
cd bug_app; composer req symfony/phpunit-bridge

Launch tests
php bin/phpunit -c .

You can see the warning
PHP Warning: DOMDocument::load(): Document is empty in bug_app, line: 1 in bug_app/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php on line 38

@fabpot
Copy link
Member
fabpot commented Jan 30, 2020

fixed by #34808

@fabpot fabpot closed this as completed Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0