This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269506 - PHPUnit --list_groups fails when used with composer and laravel, add ability to define list_groups argument
Summary: PHPUnit --list_groups fails when used with composer and laravel, add ability ...
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: PHPUnit (show other bugs)
Version: 8.2
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-07 22:35 UTC by oukjweather
Modified: 2017-01-07 22:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description oukjweather 2017-01-07 22:35:37 UTC
I have a project directory structure that looks like this
app/
bootstrap/
public/
tests/
vendor/



When running a command such as:
"/usr/local/bin/php" "vendor/phpunit/phpunit/phpunit" "--colors" "--list-groups" "."

it fails. As a result the popup for selecting groups of test to run never shows up. Examining the error output reveals it tries to load all the test in the vendor folder. If you run the command manually from the command line you get the same result as expected. When you remove the argument "." from --list-groups. It works. If you define ./test/ it works. So I would like to have the ability to define that argument.

Here is what phpunit.xml looks like:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
         backupStaticAttributes="false"
         bootstrap="bootstrap/autoload.php"
         colors="true"
         convertErrorsToExceptions="true"
         convertNoticesToExceptions="true"
         convertWarningsToExceptions="true"
         processIsolation="false"
         stopOnFailure="true"
         syntaxCheck="false">
    <testsuites>
        <testsuite name="init">
            <file>
                ./tests/InitTest.php
            </file>
        </testsuite>
        <testsuite name="Application Test Suite">
            <directory>./tests/</directory>
        </testsuite>
    </testsuites>
    <php>
        <env name="APP_ENV" value="testing"/>
        <env name="BLEEDING_BETA" value="1"/>
        <env name="MASTER_DB_READ_HOST" value="localhost"/>
        <env name="MASTER_DB_WRITE_HOST" value="localhost"/>
        <env name="DB_USERNAME" value="root"/>
    </php>
    <filter>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">./app</directory>
            <file>./app/**</file>
            <exclude>
                <file>./app/Http/routes.php</file>
            </exclude>
        </whitelist>
    </filter>     
</phpunit>

Here is a portion of the relevant composer packages being loaded:

        "laravel/framework": "5.1.35",
        "laravelcollective/html": "5.1.*",
        "graham-campbell/markdown": "~3.0",
        "barryvdh/laravel-debugbar": "~2.0",
        "stripe/stripe-php": "2.*",
        "hisorange/browser-detect": "2.*",
        "phpunit/phpunit": "~4.0",
        "phpunit/phpunit-skeleton-generator": "*",
        "phpspec/phpspec": "~2.1",
        "doctrine/dbal": "^2.5"

If you create a project with the above specifics you will be able to get the problem to occur.