From 6134d1d4c8b4e8965e7a4ec59621b1e9e9360e5a Mon Sep 17 00:00:00 2001 From: Noah Eisen Date: Fri, 21 Oct 2016 17:07:01 -0700 Subject: change unimplemented_method to unimplemented_service. Add real unimplemented_method test --- src/php/tests/interop/interop_client.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/php') 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; -- cgit v1.2.3