diff options
author | 2015-08-27 09:41:59 -0700 | |
---|---|---|
committer | 2015-09-02 13:34:40 -0700 | |
commit | 5331776c17f775911fedcadfcb530bd46af024ea (patch) | |
tree | f340726941cdc640d3a051189163888f2618d12b /src/php/tests/generated_code | |
parent | 3ab8e79b0111dc93696d72e815531b5ee3124230 (diff) |
php: clean up api around flags
Diffstat (limited to 'src/php/tests/generated_code')
-rw-r--r-- | src/php/tests/generated_code/AbstractGeneratedCodeTest.php | 12 |
1 files changed, 12 insertions, 0 deletions
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); |