2

problem

Recently, I encountered a problem when using Lumen to do unit testing, that is, I opened multiple projects (user side and management side) with PHPStorm. At this time, when the Test Sources Root was set, it would be found that the namespace PHPStorm of the test case could not be recognized. And if it is directly a project, there is no such problem.

image.png

image.png

image.png

solution

After studying for a long time, I finally found a solution that can realize PHPStorm's recognition of these directories under multiple projects.

  • Set as Test Sources Root first
  • Edit on the settings page to modify the namespace prefix.
    image.png

    image.png

    image.png

Copyright Notice

Please indicate the author and source of the article for reprinting
Author: Mr. X
https://segmentfault.com/a/1190000040581919

feel good, please help to collect and like~


X先生
317 声望786 粉丝

腾讯TEG研发管理部小小后台攻城狮一枚,负责腾讯敏捷产品研发平台TAPD的基础功能的开发和维护,热爱技术,喜欢分享,欢迎与我交流~