mardi 28 février 2017

Avoid executing external plugins' test cases

composer.json

    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.4.*",
        "laravel/socialite": "^3.0",
        ...
        "chencha/share": "^5.2"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~5.7"
    },
    ...
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },

phpunit.xml

<phpunit backupGlobals="false"
         backupStaticAttributes="false"
         bootstrap="bootstrap/autoload.php"
         colors="true"
         convertErrorsToExceptions="true"
         convertNoticesToExceptions="true"
         convertWarningsToExceptions="true"
         processIsolation="false"
         stopOnFailure="false">
    <testsuites>
        <testsuite name="Application Test Suite">
            <directory suffix="Test.php">./tests</directory>
        </testsuite>
    </testsuites>
    <filter>
        <whitelist processUncoveredFilesFromWhitelist="true">
            <directory suffix=".php">./app</directory>
        </whitelist>
    </filter>
    <php>
        <env name="APP_ENV" value="testing"/>
        <env name="CACHE_DRIVER" value="array"/>
        <env name="SESSION_DRIVER" value="array"/>
        <env name="QUEUE_DRIVER" value="sync"/>
    </php>
</phpunit>

When I run phpunit it gives me following error

PHP Fatal error: Class 'Orchestra\Testbench\TestCase' not found in /usr/lib/php5/voice/v1.5/vendor/chencha/share/tests/TestCase.php on line 3

I can add "orchestra/testbench": "~3.0" under my require-dev which will solve the issue, But is there way I can run only my test cases without the plugins' test cases?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2lwHjDM
via IFTTT

Aucun commentaire:

Enregistrer un commentaire