diff options
author | murgatroid99 <michael.lumish@gmail.com> | 2015-01-16 09:57:05 -0800 |
---|---|---|
committer | murgatroid99 <michael.lumish@gmail.com> | 2015-01-16 09:57:05 -0800 |
commit | 1d89452e1128a0bfe7324ddaa5fcd26256d23b73 (patch) | |
tree | d8bfb3ca4dbd815f67b07e5c37cb589ff3d3962f /src/php/tests | |
parent | 0aa22c3ce1e17b4c96cac35b0a2420604578534f (diff) |
Switched to new grpc_call_invoke API
Diffstat (limited to 'src/php/tests')
-rwxr-xr-x | src/php/tests/unit_tests/CallTest.php | 6 | ||||
-rwxr-xr-x | src/php/tests/unit_tests/EndToEndTest.php | 24 | ||||
-rwxr-xr-x | src/php/tests/unit_tests/SecureEndToEndTest.php | 24 |
3 files changed, 15 insertions, 39 deletions
diff --git a/src/php/tests/unit_tests/CallTest.php b/src/php/tests/unit_tests/CallTest.php index 253052a038..795831cb65 100755 --- a/src/php/tests/unit_tests/CallTest.php +++ b/src/php/tests/unit_tests/CallTest.php @@ -19,10 +19,10 @@ class CallTest extends PHPUnit_Framework_TestCase{ /** * @expectedException LogicException * @expectedExceptionCode Grpc\CALL_ERROR_INVALID_FLAGS - * @expectedExceptionMessage start_invoke + * @expectedExceptionMessage invoke */ - public function testStartInvokeRejectsBadFlags() { - $this->call->start_invoke($this->cq, 0, 0, 0, 0xDEADBEEF); + public function testInvokeRejectsBadFlags() { + $this->call->invoke($this->cq, 0, 0, 0xDEADBEEF); } /** diff --git a/src/php/tests/unit_tests/EndToEndTest.php b/src/php/tests/unit_tests/EndToEndTest.php index 3818f9531c..78c5e9f93b 100755 --- a/src/php/tests/unit_tests/EndToEndTest.php +++ b/src/php/tests/unit_tests/EndToEndTest.php @@ -25,18 +25,12 @@ class EndToEndTest extends PHPUnit_Framework_TestCase{ $deadline); $tag = 1; $this->assertEquals(Grpc\CALL_OK, - $call->start_invoke($this->client_queue, - $tag, - $tag, - $tag)); + $call->invoke($this->client_queue, + $tag, + $tag)); $server_tag = 2; - // the client invocation was accepted - $event = $this->client_queue->next($deadline); - $this->assertNotNull($event); - $this->assertEquals(Grpc\INVOKE_ACCEPTED, $event->type); - $call->writes_done($tag); $event = $this->client_queue->next($deadline); $this->assertNotNull($event); @@ -103,18 +97,12 @@ class EndToEndTest extends PHPUnit_Framework_TestCase{ $deadline); $tag = 1; $this->assertEquals(Grpc\CALL_OK, - $call->start_invoke($this->client_queue, - $tag, - $tag, - $tag)); + $call->invoke($this->client_queue, + $tag, + $tag)); $server_tag = 2; - // the client invocation was accepted - $event = $this->client_queue->next($deadline); - $this->assertNotNull($event); - $this->assertEquals(Grpc\INVOKE_ACCEPTED, $event->type); - // the client writes $call->start_write($req_text, $tag); $event = $this->client_queue->next($deadline); diff --git a/src/php/tests/unit_tests/SecureEndToEndTest.php b/src/php/tests/unit_tests/SecureEndToEndTest.php index c562a821a4..7c3ad8a07c 100755 --- a/src/php/tests/unit_tests/SecureEndToEndTest.php +++ b/src/php/tests/unit_tests/SecureEndToEndTest.php @@ -37,17 +37,11 @@ class SecureEndToEndTest extends PHPUnit_Framework_TestCase{ $deadline); $tag = 1; $this->assertEquals(Grpc\CALL_OK, - $call->start_invoke($this->client_queue, - $tag, - $tag, - $tag)); + $call->invoke($this->client_queue, + $tag, + $tag)); $server_tag = 2; - // the client invocation was accepted - $event = $this->client_queue->next($deadline); - $this->assertNotNull($event); - $this->assertEquals(Grpc\INVOKE_ACCEPTED, $event->type); - $call->writes_done($tag); $event = $this->client_queue->next($deadline); $this->assertNotNull($event); @@ -113,18 +107,12 @@ class SecureEndToEndTest extends PHPUnit_Framework_TestCase{ $deadline); $tag = 1; $this->assertEquals(Grpc\CALL_OK, - $call->start_invoke($this->client_queue, - $tag, - $tag, - $tag)); + $call->invoke($this->client_queue, + $tag, + $tag)); $server_tag = 2; - // the client invocation was accepted - $event = $this->client_queue->next($deadline); - $this->assertNotNull($event); - $this->assertEquals(Grpc\INVOKE_ACCEPTED, $event->type); - // the client writes $call->start_write($req_text, $tag); $event = $this->client_queue->next($deadline); |