PHP7.4和PHPUnit 9private function ensureIsValidEmail(string $email): void if (" is not a valid email address', ) }主页还向我们展示了如何使用expectException()方法测试异常:
public function t
我以为我能做到: try{ $this->expectException(WhateverExceptioncode that throws // assert that $obj's state is still valid}
但我立即意识到,如果finally中的代码也因为某种原因抛出,那肯定会给PHPUnit带来一些问题(确