diff --git a/CHANGELOG.md b/CHANGELOG.md index e12d7068..8b76ed57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 1.0.20 - 2019-03-13 +- Improve Tests. +- Update Docs. + + ## 1.0.19 - 2019-03-12 - Add SSL Verify Option `verify()`. diff --git a/src/AlibabaCloud.php b/src/AlibabaCloud.php index 54c3d1bb..0768e1af 100644 --- a/src/AlibabaCloud.php +++ b/src/AlibabaCloud.php @@ -28,7 +28,7 @@ class AlibabaCloud /** * Version of the Client */ - const VERSION = '1.0.19'; + const VERSION = '1.0.20'; /** * This static method can directly call the specific service. diff --git a/tests/Unit/FunctionsTest.php b/tests/Unit/FunctionsTest.php index 594cb51c..f3acb97a 100644 --- a/tests/Unit/FunctionsTest.php +++ b/tests/Unit/FunctionsTest.php @@ -62,4 +62,20 @@ public static function testString() self::assertEquals('"Alibaba Cloud', getenv('STRING')); self::assertEquals('"Alibaba Cloud', \AlibabaCloud\Client\env('STRING')); } + + public static function testEnvNotEmpty() + { + self::assertFalse(\AlibabaCloud\Client\envNotEmpty('ALIBABA_CLOUD_NOT_EXISTS')); + } + + /** + * @expectedException \AlibabaCloud\Client\Exception\ClientException + * @expectedExceptionMessage Environment variable 'ALIBABA_CLOUD_NOT_EXISTS' cannot be empty + */ + public static function testEnvNotEmptyException() + { + putenv('ALIBABA_CLOUD_NOT_EXISTS='); + + self::assertFalse(\AlibabaCloud\Client\envNotEmpty('ALIBABA_CLOUD_NOT_EXISTS')); + } }