Eclipse PDT & PHPUnit?

后端 未结 13 1294
野的像风
野的像风 2021-01-30 17:35

Is there any integration of PHPUnit with Eclipse PDT?

If not, are there any plans to do so?

13条回答
  •  一个人的身影
    2021-01-30 18:07

    It is possible to integrate PHPUnit with PDT in a simple way (these settings aren't fully generic but should be a good starting point).

    1. Select the Run > External Tools > External tools configurations
    2. Create a new program
    3. Set the Location to point to your executable (/usr/bin/phpunit on linux)
    4. Set the Working Directory to use the variable ${workspace_loc}
    5. Set the Arguments to ${resource_path}

    Now select Run > External Tools > PHPUnit to execute the selected test file. This simply executes phpunit and sends STDOUT to the Eclipse terminal. Simple but effective.

    Subsequently, you can use the icon with a green arrow and red toolbox to run PHPUnit without having to navigate the menus.

提交回复
热议问题