/** * 校验object参数 * * @param string $object * @throws OssException */ private function precheckObject($object) { OssUtil::throwOssExceptionWithMessageIfEmpty($object, "object name is empty"); }
public function testThrowOssExceptionWithMessageIfEmpty3() { $null = "xx"; try { OssUtil::throwOssExceptionWithMessageIfEmpty($null, "xx"); $this->assertTrue(True); } catch (OssException $e) { $this->assertTrue(false); } }