【发布时间】:2016-06-21 02:15:15
【问题描述】:
我正在尝试使用 phpUnit 注释来捕获异常:
/**
* @expectedException Drupal\apple_news\Api\Exception\ApiException.
*/
public function testDecodeResponse() {
$this->client->decodeResponse('');
}
看起来不错,事实上如果我使用 setExpectedException 工作正常,但我得到:
ReflectionException: Class Drupal\apple_news\Api\Exception\ApiException. does not exist
知道为什么会这样吗?
谢谢。
【问题讨论】: