PHPUnit - Use $this or self for static methods?

前端 未结 3 1571
执念已碎
执念已碎 2020-12-09 08:49

I don\'t want to write a long text, because it is a short question. PHPUnit tests contain several methods that are static. For example all those \\PHPUnit\\Framework\\Assert

3条回答
  •  借酒劲吻你
    2020-12-09 09:32

    The phpunit documentation says you can use either and doesnt advocate one over the other. So you choose! https://phpunit.readthedocs.io/en/9.2/assertions.html

提交回复
热议问题