Skip to content

[6.0] PHPUnit can only be run from project root #29862

@marvinrabe

Description

@marvinrabe
  • Laravel Version: 6.0.0
  • PHP Version: 7.3.2
  • Database Driver & Version: Not important.

Description:

Since Laravel 6 I cannot run any test with the PHPStorm PHPUnit test runner. The process dies with the following error message

Testing started at 00:01 ...
/usr/local/Cellar/php/7.3.4_1/bin/php /Users/marvin/Sites/test6/vendor/phpunit/phpunit/phpunit --configuration /Users/marvin/Sites/test6/phpunit.xml --teamcity

In PackageManifest.php line 168:
                                                               
  The bootstrap/cache directory must be present and writable.  
                                                               

Process finished with exit code 0

The folder bootstrap/cache is writable.

When I run phpunit from the Terminal everything works as expected.

Steps To Reproduce:

  1. Install PHPStorm (2019.2)
  2. Create new Laravel 6 project with laravel new
  3. Open Project in PHPStorm
  4. Setup PHPStorm PHPUnit Testrunner with default phpunit.xml file and PHPUnit from vendor/autoload.php
  5. Run Tests

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions