How to Determine if PHPUnit Tests are Running?

前端 未结 5 1193
别跟我提以往
别跟我提以往 2020-12-30 20:03

I currently have a problem that I have to work around in legacy code to get our interaction with a PHP Extension to work properly (Singleton Testing Question).

As su

5条回答
  •  半阙折子戏
    2020-12-30 20:52

    Define a constant in your PHPUnit bootstrap.php file. This is executed before loading or running any tests. This shouldn't impact developers running the application normally--just the unit tests.

提交回复
热议问题