Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $fcClient->createFunction(
array(
'functionName' => $functionName,
'handler' => 'index.handler',
'runtime' => 'php7',
'runtime' => 'php7.2',
'memorySize' => 128,
'code' => array(
'zipFile' => base64_encode(file_get_contents(__DIR__ . '/main.zip')),
Expand Down
12 changes: 6 additions & 6 deletions test/client_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ private function subTestListServices() {
$this->assertEquals($services[0]['serviceName'], $prefix . 'abd');
}

private function checkFunction($function, $functionName, $desc, $runtime = 'php7', $handler = 'index.handler', $envs = ['TestKey' => 'TestValue']) {
private function checkFunction($function, $functionName, $desc, $runtime = 'php7.2', $handler = 'index.handler', $envs = ['TestKey' => 'TestValue']) {
$etag = $function['headers']['Etag'][0];
$this->assertTrue($etag != '');
$function = $function['data'];
Expand Down Expand Up @@ -296,7 +296,7 @@ public function testFunctionCRUDInvoke() {
array(
'functionName' => $functionName,
'handler' => 'index.handler',
'runtime' => 'php7',
'runtime' => 'php7.2',
'memorySize' => 128,
'code' => array(
'zipFile' => base64_encode(file_get_contents(__DIR__ . '/index.zip')),
Expand All @@ -305,7 +305,7 @@ public function testFunctionCRUDInvoke() {
'environmentVariables' => ['TestKey' => 'TestValue'],
)
);
$this->checkFunction($ret, $functionName, 'test function', $runtime = 'php7');
$this->checkFunction($ret, $functionName, 'test function', $runtime = 'php7.2');

$invkRet = $this->fcClient->invokeFunction($serviceName, $functionName, $payload = "hello world");
$this->assertEquals($invkRet['data'], 'hello world');
Expand Down Expand Up @@ -356,7 +356,7 @@ private function subTestListFunctions($serviceName) {
array(
'functionName' => $functionName,
'handler' => 'index.handler',
'runtime' => 'php7',
'runtime' => 'php7.2',
'code' => array(
'zipFile' => base64_encode(file_get_contents(__DIR__ . '/index.zip')),
),
Expand Down Expand Up @@ -420,7 +420,7 @@ public function testTriggerCRUD() {
array(
'functionName' => $functionName,
'handler' => 'index.handler',
'runtime' => 'php7',
'runtime' => 'php7.2',
'memorySize' => 128,
'code' => array(
'zipFile' => base64_encode(file_get_contents(__DIR__ . '/index.zip')),
Expand All @@ -434,7 +434,7 @@ public function testTriggerCRUD() {
array(
'functionName' => $httpFunctionName,
'handler' => 'index_http.handler',
'runtime' => 'php7',
'runtime' => 'php7.2',
'memorySize' => 128,
'code' => array(
'zipFile' => base64_encode(file_get_contents(__DIR__ . '/index_http.zip')),
Expand Down