Skip to content
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

Test Runner incorrectly treats --testsuite and --list-tests as not combinable options #5120

Closed
razzed opened this issue Dec 23, 2022 · 1 comment
Labels
feature/test-runner CLI test runner type/bug Something is broken

Comments

@razzed
Copy link

razzed commented Dec 23, 2022

Q A
PHPUnit version 9.5.26
PHP version 8.1.13
Installation Method Composer

Summary

 > phpunit --testsuite orm --list-tests
 PHPUnit 9.5.26 by Sebastian Bergmann and contributors.
 
 The --testsuite and --list-tests options cannot be combined, --testsuite is ignored
 
 Available test(s):
 tests correctly filtered goes here (just the testsuite)

Current behavior

The message "The --testsuite and --list-tests options cannot be combined, --testsuite is ignored" is incorrect. It shows the filtered lists of tests solely from the requested suite.

How to reproduce

Create any project which has more than one testsuite and run the command above using one of your suite names.

Expected behavior

No warning from the CLI as the options are compatible.

composer info | sort

components/jquery                  3.6.0   jQuery JavaScript Library
composer/pcre                      3.1.0   PCRE wrapping library that offers type-safe preg_* replacements.
composer/semver                    3.3.2   Semver library that offers utilities, version constraint parsing and...
composer/xdebug-handler            3.0.3   Restarts a process without Xdebug.
doctrine/annotations               1.13.3  Docblock Annotations Parser
doctrine/instantiator              1.4.1   A small, lightweight utility to instantiate objects in PHP without i...
doctrine/lexer                     1.2.3   PHP Doctrine Lexer parser library that can be used in Top-Down, Recu...
friendsofphp/php-cs-fixer          v3.13.0 A tool to automatically fix PHP code style
mishal/iless                       2.2.0   Less.js port to PHP
myclabs/deep-copy                  1.11.0  Create deep copies (clones) of your objects
nikic/php-parser                   v4.15.2 A PHP parser written in PHP
phar-io/manifest                   2.0.3   Component for reading phar.io manifest information from a PHP Archiv...
phar-io/version                    3.2.1   Library for handling version information and constraints
phpunit/php-code-coverage          9.2.19  Library that provides collection, processing, and rendering function...
phpunit/php-file-iterator          3.0.6   FilterIterator implementation that filters files based on a list of ...
phpunit/php-invoker                3.1.1   Invoke callables with a timeout
phpunit/php-text-template          2.0.4   Simple template engine.
phpunit/php-timer                  5.0.3   Utility class for timing
phpunit/phpunit                    9.5.26  The PHP Unit Testing framework.
psr/cache                          1.0.1   Common interface for caching libraries
psr/container                      2.0.2   Common Container Interface (PHP FIG PSR-11)
psr/event-dispatcher               1.0.0   Standard interfaces for event handling.
psr/log                            1.1.4   Common interface for logging libraries
sebastian/cli-parser               1.0.1   Library for parsing CLI options
sebastian/code-unit                1.0.8   Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup 2.0.3   Looks up which function or method a line of code belongs to
sebastian/comparator               4.0.8   Provides the functionality to compare PHP values for equality
sebastian/complexity               2.0.2   Library for calculating the complexity of PHP code units
sebastian/diff                     4.0.4   Diff implementation
sebastian/environment              5.1.4   Provides functionality to handle HHVM/PHP environments
sebastian/exporter                 4.0.5   Provides the functionality to export PHP variables for visualization
sebastian/global-state             5.0.5   Snapshotting of global state
sebastian/lines-of-code            1.0.3   Library for counting the lines of code in PHP source code
sebastian/object-enumerator        4.0.4   Traverses array structures and object graphs to enumerate all refere...
sebastian/object-reflector         2.0.4   Allows reflection of object attributes, including inherited and non-...
sebastian/recursion-context        4.0.4   Provides functionality to recursively process PHP variables
sebastian/resource-operations      3.0.3   Provides a list of PHP built-in functions that operate on resources
sebastian/type                     3.2.0   Collection of value objects that represent the types of the PHP type...
sebastian/version                  3.0.2   Library that helps with managing the version number of Git-hosted PH...
symfony/console                    v6.2.1  Eases the creation of beautiful and testable command line interfaces
symfony/deprecation-contracts      v3.1.1  A generic function and convention to trigger deprecation notices
symfony/event-dispatcher           v6.2.0  Provides tools that allow your application components to communicate...
symfony/event-dispatcher-contracts v3.1.1  Generic abstractions related to dispatching event
symfony/filesystem                 v6.2.0  Provides basic utilities for the filesystem
symfony/finder                     v6.2.0  Finds files and directories via an intuitive fluent interface
symfony/options-resolver           v6.2.0  Provides an improved replacement for the array_replace PHP function
symfony/polyfill-ctype             v1.27.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-grapheme     v1.27.0 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-normalizer   v1.27.0 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-mbstring          v1.27.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php80             v1.27.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP ver...
symfony/polyfill-php81             v1.27.0 Symfony polyfill backporting some PHP 8.1+ features to lower PHP ver...
symfony/process                    v6.2.0  Executes commands in sub-processes
symfony/service-contracts          v3.1.1  Generic abstractions related to writing services
symfony/stopwatch                  v6.2.0  Provides a way to profile code
symfony/string                     v6.2.0  Provides an object-oriented API to strings and deals with bytes, UTF...
theseer/tokenizer                  1.2.1   A small library for converting tokenized PHP source code into XML an...
@razzed razzed added the type/bug Something is broken label Dec 23, 2022
@razzed
Copy link
Author

razzed commented Dec 23, 2022

Duplicates #5109

@sebastianbergmann sebastianbergmann added the feature/test-runner CLI test runner label Dec 23, 2022
@sebastianbergmann sebastianbergmann changed the title CLI tool incorrectly reports incompatible options --testsuite and --list-tests but behaves correctly Test Runner incorrectly treats --testsuite and --list-tests as not combinable options Dec 23, 2022
sebastianbergmann added a commit that referenced this issue Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/test-runner CLI test runner type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants