aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/tests/unit_tests/CallTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/php/tests/unit_tests/CallTest.php')
-rwxr-xr-xsrc/php/tests/unit_tests/CallTest.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/php/tests/unit_tests/CallTest.php b/src/php/tests/unit_tests/CallTest.php
index 3b697b50c3..1170a440fa 100755
--- a/src/php/tests/unit_tests/CallTest.php
+++ b/src/php/tests/unit_tests/CallTest.php
@@ -91,4 +91,32 @@ class CallTest extends PHPUnit_Framework_TestCase
{
$this->assertTrue(is_string($this->call->getPeer()));
}
+
+ public function testCancel()
+ {
+ $this->assertNull($this->call->cancel());
+ }
+
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidMetadataKey()
+ {
+ $batch = [
+ 'invalid' => ['key1' => 'value1'],
+ ];
+ $result = $this->call->startBatch($batch);
+ }
+
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidMetadataInnerValue()
+ {
+ $batch = [
+ Grpc\OP_SEND_INITIAL_METADATA => ['key1' => 'value1'],
+ ];
+ $result = $this->call->startBatch($batch);
+ }
+
}