aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@google.com>2016-10-21 17:07:01 -0700
committerGravatar Noah Eisen <ncteisen@google.com>2016-10-21 17:07:01 -0700
commit6134d1d4c8b4e8965e7a4ec59621b1e9e9360e5a (patch)
tree300bbc3f6daeaca0f0089e794769604fe1d20b15 /src/php
parent99e61f884d0c2b1e1e2af9a41ec2018b47041fec (diff)
change unimplemented_method to unimplemented_service. Add real unimplemented_method test
Diffstat (limited to 'src/php')
-rwxr-xr-xsrc/php/tests/interop/interop_client.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php
index 72012a49d0..3d62e86ab0 100755
--- a/src/php/tests/interop/interop_client.php
+++ b/src/php/tests/interop/interop_client.php
@@ -500,6 +500,16 @@ function statusCodeAndMessage($stub)
$status->details);
}
+# NOTE: the stub input to this function is from UnimplementedService
+function unimplementedService($stub)
+{
+ $call = $stub->UnimplementedCall(new grpc\testing\EmptyMessage());
+ list($result, $status) = $call->wait();
+ hardAssert($status->code === Grpc\STATUS_UNIMPLEMENTED,
+ 'Received unexpected status code');
+}
+
+# NOTE: the stub input to this function is from TestService
function unimplementedMethod($stub)
{
$call = $stub->UnimplementedCall(new grpc\testing\EmptyMessage());
@@ -592,7 +602,7 @@ function _makeStub($args)
$opts['update_metadata'] = $update_metadata;
}
- if ($test_case === 'unimplemented_method') {
+ if ($test_case === 'unimplemented_service') {
$stub = new grpc\testing\UnimplementedServiceClient($server_address,
$opts);
} else {
@@ -645,6 +655,9 @@ function interop_main($args, $stub = false)
case 'status_code_and_message':
statusCodeAndMessage($stub);
break;
+ case 'unimplemented_service':
+ unimplementedService($stub);
+ break;
case 'unimplemented_method':
unimplementedMethod($stub);
break;