From 5331776c17f775911fedcadfcb530bd46af024ea Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 27 Aug 2015 09:41:59 -0700 Subject: php: clean up api around flags --- src/php/tests/generated_code/AbstractGeneratedCodeTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/php/tests/generated_code') diff --git a/src/php/tests/generated_code/AbstractGeneratedCodeTest.php b/src/php/tests/generated_code/AbstractGeneratedCodeTest.php index 531e80aa61..9cee188666 100644 --- a/src/php/tests/generated_code/AbstractGeneratedCodeTest.php +++ b/src/php/tests/generated_code/AbstractGeneratedCodeTest.php @@ -51,6 +51,18 @@ abstract class AbstractGeneratedCodeTest extends PHPUnit_Framework_TestCase { $this->assertTrue(is_string(self::$client->getTarget())); } + public function testWriteFlags() { + $div_arg = new math\DivArgs(); + $div_arg->setDividend(7); + $div_arg->setDivisor(4); + $call = self::$client->Div($div_arg, array(), array('flags' => Grpc\WRITE_NO_COMPRESS)); + $this->assertTrue(is_string($call->getPeer())); + list($response, $status) = $call->wait(); + $this->assertSame(1, $response->getQuotient()); + $this->assertSame(3, $response->getRemainder()); + $this->assertSame(\Grpc\STATUS_OK, $status->code); + } + public function testSimpleRequest() { $div_arg = new math\DivArgs(); $div_arg->setDividend(7); -- cgit v1.2.3