aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/tests/unit_tests/CallTest.php
diff options
context:
space:
mode:
authorGravatar Mathieu Leenhardt <mleenhardt@users.noreply.github.com>2016-04-06 23:04:16 +0200
committerGravatar Mathieu Leenhardt <mleenhardt@users.noreply.github.com>2016-04-06 23:04:16 +0200
commitefa6af7381a78c67785f1717fa6497e1577f6638 (patch)
tree3e8e8ad72a994a72d422d971f2b93489174b6955 /src/php/tests/unit_tests/CallTest.php
parent9ef407b0d771878ca1c0f35b4554dd64a3492908 (diff)
parent39a96967f1b003391b02317bf7c6fb003edc4722 (diff)
Merge branch 'master' into calloptions-fluent
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);
+ }
+
}