Static class/method/property in unit test, stop it or not

后端 未结 5 2081
野性不改
野性不改 2020-12-03 07:37

Should a static class/method/property be used in a unit test development environment, given that there is no way to test it without introducing a wrapper that is again not t

5条回答
  •  离开以前
    2020-12-03 07:48

    I find this threat regardless of the programming language, but since my daily life is related to PHP, here is good resource to deal with static methods on PHP http://docs.mockery.io/en/latest/reference/public_static_properties.html

提交回复
热议问题