diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php index f6ae683efc1..908fb3ce964 100755 --- a/src/php/tests/interop/interop_client.php +++ b/src/php/tests/interop/interop_client.php @@ -609,6 +609,31 @@ function statusCodeAndMessage($stub) $status->details); } +function specialStatusMessage($stub) +{ + $test_code = Grpc\STATUS_UNKNOWN; + $test_msg = "\t\ntest with whitespace\r\nand Unicode BMP ☺ and non-BMP 😈\t\n"; + + $echo_status = new Grpc\Testing\EchoStatus(); + $echo_status->setCode($test_code); + $echo_status->setMessage($test_msg); + + $request = new Grpc\Testing\SimpleRequest(); + $request->setResponseStatus($echo_status); + + $call = $stub->UnaryCall($request); + list($result, $status) = $call->wait(); + + hardAssert( + $status->code === $test_code, + 'Received unexpected UnaryCall status code: ' . $status->code + ); + hardAssert( + $status->details === $test_msg, + 'Received unexpected UnaryCall status details: ' . $status->details + ); +} + # NOTE: the stub input to this function is from UnimplementedService function unimplementedService($stub) { @@ -761,6 +786,8 @@ function interop_main($args, $stub = false) case 'status_code_and_message': statusCodeAndMessage($stub); break; + case 'special_status_message': + specialStatusMessage($stub); case 'unimplemented_service': unimplementedService($stub); break; diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index b106f672554..a3e2d34f5ad 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -501,7 +501,6 @@ class PHP7Language: def unimplemented_test_cases(self): return _SKIP_SERVER_COMPRESSION + \ _SKIP_DATA_FRAME_PADDING + \ - _SKIP_SPECIAL_STATUS_MESSAGE + \ _SKIP_GOOGLE_DEFAULT_CREDS + \ _SKIP_COMPUTE_ENGINE_CHANNEL_CREDS