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

Warning: Illegal string offset 'failOnRisky' and 'failOnWarning' #2775

Closed
df-mreidel opened this issue Sep 15, 2017 · 1 comment
Closed

Warning: Illegal string offset 'failOnRisky' and 'failOnWarning' #2775

df-mreidel opened this issue Sep 15, 2017 · 1 comment

Comments

@df-mreidel
Copy link

df-mreidel commented Sep 15, 2017

Q A
PHPUnit version 6.3.0
PHP version 7.1.8
Installation Method Composer

When running a single files, everything runs smooth and without any notices. If I run vendor/bin/phpunit tests/integration however, I'm getting

PHPUnit 6.3.0 by Sebastian Bergmann and contributors.

...........................................                       43 / 43 (100%)

Time: 1.41 seconds, Memory: 6.00MB

OK (43 tests, 75 assertions)

Warning: Illegal string offset 'failOnRisky' in /usr/local/xxx/vendor/phpunit/phpunit/src/TextUI/TestRunner.php on line 669

Warning: Illegal string offset 'failOnWarning' in /usr/local/xxx/vendor/phpunit/phpunit/src/TextUI/TestRunner.php on line 673

It happens even after a clean install, without any config files. I tried to fix the error by supplying the corresponding command line parameters, but that didn't work. Neither did creating a config file:

<?xml version="1.0" encoding="utf-8" ?>
<phpunit backupGlobals="true"
         backupStaticAttributes="true"
         bootstrap="tests/integration/bootstrap.ini"
         failOnWarning="true"
         failOnRisky="true"
         timeoutForSmallTests="1"
         timeoutForMediumTests="10"
         timeoutForLargeTests="60"
         verbose="false">
  <testsuites>
    <testsuite name="IntegrationTests">
      <directory suffix="php" phpVersion="7.1.0" phpVersionOperator=">=">tests/integration</directory>
    </testsuite>
  </testsuites>
</phpunit>
@df-mreidel
Copy link
Author

Adding to the above, I wanted to know what's actually inside $arguments and here it is:

string(1446) "{"listGroups": false, "listSuites": false, "loader": null, "useDefaultConfiguration": true, "loadedExtensions": {}, "notLoadedExtensions": {}, "testSuffixes": ["Test.php", ".phpt"], "configuration": Object PHPUnit\Util\Configuration, "debug": false, "filter": false, "listeners": {}, "backupGlobals": true, "backupStaticAttributes": true, "timeoutForSmallTests": 1, "timeoutForMediumTests": 10, "timeoutForLargeTests": 60, "verbose": true, "testdoxGroups": {}, "testdoxExcludeGroups": {}, "addUncoveredFilesFromWhitelist": true, "beStrictAboutChangesToGlobalState": null, "beStrictAboutResourceUsageDuringSmallTests": false, "cacheTokens": false, "colors": "never", "columns": 80, "convertDeprecationsToExceptions": true, "convertErrorsToExceptions": true, "convertNoticesToExceptions": true, "convertWarningsToExceptions": true, "crap4jThreshold": 30, "disallowTestOutput": false, "disallowTodoAnnotatedTests": false, "enforceTimeLimit": false, "excludeGroups": {}, "failOnRisky": false, "failOnWarning": false, "groups": {}, "processIsolation": false, "processUncoveredFilesFromWhitelist": false, "registerMockObjectsFromTestArgumentsRecursively": false, "repeat": false, "reportHighLowerBound": 90, "reportLowUpperBound": 50, "reportUselessTests": true, "reverseList": false, "stopOnError": false, "stopOnFailure": false, "stopOnIncomplete": false, "stopOnRisky": false, "stopOnSkipped": false, "stopOnWarning": false, "strictCoverage": false}"

I doubt that it's supposed to be JSON instead of a PHP array...

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

1 participant