public assertClientException ( callable $fn ) | ||
$fn | callable |
public function assertClientException(callable $fn)
{
try {
call_user_func($fn);
$this->fail('ClientException is expected.');
} catch (ClientException $e) {
$this->assertContains('AWS Error', $e->getMessage(), '', true);
}
}