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

Could not use "PHPUnit_Runner_StandardTestSuiteLoader" as loader #1265

Closed
nickchang opened this issue May 20, 2014 · 7 comments
Closed

Could not use "PHPUnit_Runner_StandardTestSuiteLoader" as loader #1265

nickchang opened this issue May 20, 2014 · 7 comments

Comments

@nickchang
Copy link

I follow document to installed.

it's my phpunit.xml








But, When I run "phpunit -c phpunit.xml"

Error:
phpunit
PHPUnit 4.1.0 by Sebastian Bergmann.

Could not use "PHPUnit_Runner_StandardTestSuiteLoader" as loader.

I don't why?? Can everyone tell me?? How to solve this problem??

Thanks

@avatasia
Copy link

Edit your phpunit.xml,
replace testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
with testSuiteLoaderFile="phpunit/src/Runner/StandardTestSuiteLoader.php"

@wontonst
Copy link

can someone explain why we need to make this change? the phpunit manual doesn't say anything about this

@whatthejeff
Copy link
Contributor

@wontonst sorry for the inconvenience. I'll look into this shortly and adjust the documentation if necessary.

@JosephMoniz
Copy link

This doesn't seem to fix the issue when using via a composer install.

Note the following output:

./bin/phpunit --configuration unit.xml
PHPUnit 4.1.3-7-gf106c8d by Sebastian Bergmann.

Could not use "vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php" as loader.

When unit.xml is as follows:

<phpunit
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
        backupGlobals="true"
        backupStaticAttributes="false"
        bootstrap="tests/bootstrap.php"
        cacheTokens="false"
        colors="false"
        convertErrorsToExceptions="true"
        convertNoticesToExceptions="true"
        convertWarningsToExceptions="true"
        forceCoversAnnotation="false"
        mapTestClassNameToCoveredClassName="false"
        printerClass="PHPUnit_TextUI_ResultPrinter"
        processIsolation="false"
        stopOnError="false"
        stopOnFailure="false"
        stopOnIncomplete="false"
        stopOnSkipped="false"
        testSuiteLoaderClass="vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php"
        timeoutForSmallTests="1"
        timeoutForMediumTests="10"
        timeoutForLargeTests="60"
        strict="false"
        verbose="false">
    <testsuites>
        <testsuite name="Default">
            <directory>tests/*Test.php files</directory>
            <exclude>tests/bootstrap.php</exclude>
        </testsuite>
    </testsuites>
</phpunit>

Also tried to use the path of phpunit/src/Runner/StandardTestSuiteLoader.php as suggested by earlier comments only to get the same result.

@programmerq
Copy link

change testSuiteLoaderClass to testSuiteLoaderFile. I just had that happen to me too.

@JosephMoniz
Copy link

@programmerq

I actually got it to work by just completely deleting that line.

@whatthejeff
Copy link
Contributor

This should be fixed in the next release. Thanks for your patience!

marabesi added a commit to nfephp-org/sped-gnre that referenced this issue Apr 14, 2017
PedroAmorim pushed a commit to PedroAmorim/PHPoAuthLib that referenced this issue Oct 18, 2017
For more information, see:
sebastianbergmann/phpunit#1265
PedroAmorim pushed a commit to PedroAmorim/PHPoAuthLib that referenced this issue Oct 19, 2017
For more information, see:
sebastianbergmann/phpunit#1265
PedroAmorim pushed a commit to PedroAmorim/PHPoAuthLib that referenced this issue Apr 4, 2018
For more information, see:
sebastianbergmann/phpunit#1265
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants