Skip to content

Commit

Permalink
update tests (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
宋神宗 authored Mar 13, 2019
1 parent ca8c393 commit 914f300
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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()`.

Expand Down
2 changes: 1 addition & 1 deletion src/AlibabaCloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 16 additions & 0 deletions tests/Unit/FunctionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}
}

0 comments on commit 914f300

Please sign in to comment.