【问题标题】:Run all tests in PHPunit at once but isolated from each other一次在 PHPunit 中运行所有测试,但彼此隔离
【发布时间】:2019-08-24 02:37:34
【问题描述】:

我的一些测试包含ob_start();,如果我只是运行vendor/bin/phpunit(一次运行所有测试)会导致问题,但是如果我通过vendor/bin/phpunit --filter mytest 逐一隔离测试,它们可以正常工作。

有没有办法“一次”运行测试但在内部“隔离”?

【问题讨论】:

  • 你试过 $actualOutput = ob_get_clean(); $this->assertSame($actualOutput,$expectedOutput);

标签: php unit-testing testing phpunit


【解决方案1】:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-02-14
    • 1970-01-01
    • 2020-04-28
    • 2010-11-27
    • 2013-08-17
    • 1970-01-01
    • 2015-02-19
    相关资源
    最近更新 更多