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
Closed
@michaelthieulin

Description

@michaelthieulin

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0