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

PHPStorm fails when using a custom result printer #2141

Closed
dawehner opened this issue Apr 14, 2016 · 3 comments
Closed

PHPStorm fails when using a custom result printer #2141

dawehner opened this issue Apr 14, 2016 · 3 comments

Comments

@dawehner
Copy link
Contributor

We introduced a custom result printer for some end-to-end test class, that prints out URLs to dumps of the HTML of each visited URL.

The phpunit.xml looks like the following:

<phpunit bootstrap="tests/bootstrap.php" colors="true"
         beStrictAboutTestsThatDoNotTestAnything="true"
         beStrictAboutOutputDuringTests="true"
         beStrictAboutChangesToGlobalState="true"
         checkForUnintentionallyCoveredCode="false"
         printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter">
  <php>

Running these tests works perfectly fine from the command line, but they fatal when you run the tests directly via phpstorm:

/usr/local/Cellar/php56/5.6.18/bin/php /private/var/folders/9b/073w6tbx1tgfnhzsx7_4ps_w0000gn/T/ide-phpunit.php --configuration /Users/dawehner/www/d8/core/phpunit.xml.dist Drupal\Tests\simpletest\Functional\BrowserTestBaseTest /Users/dawehner/www/d8/core/modules/simpletest/tests/src/Functional/BrowserTestBaseTest.php
Testing started at 09:15 ...

Notice: Trying to get property of non-object in /private/var/folders/9b/073w6tbx1tgfnhzsx7_4ps_w0000gn/T/ide-phpunit.php on line 262

Long story short, the bug is in PHPStorm (https://youtrack.jetbrains.com/issue/WI-24808) but let's at least improve the docs a bit: #2140

@dawehner
Copy link
Contributor Author

Let's close the issue, but posting it here maybe helps other people

@sebastianbergmann
Copy link
Owner

Maybe @SvetlanaZem can help but I am afraid that this is not a PHPUnit issue but one with PhpStorm's old wrapper for it.

@dawehner
Copy link
Contributor Author

@sebastianbergmann
Yeah totally, I posted a patch on their queue which should / could help

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

2 participants