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')
-rw-r--r--src/php/tests/unit_tests/CallTest.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/php/tests/unit_tests/CallTest.php b/src/php/tests/unit_tests/CallTest.php
index d736f51546..1205f0cd8e 100644
--- a/src/php/tests/unit_tests/CallTest.php
+++ b/src/php/tests/unit_tests/CallTest.php
@@ -113,7 +113,7 @@ class CallTest extends PHPUnit_Framework_TestCase
/**
* @expectedException InvalidArgumentException
*/
- public function testInvalidMetadataKey()
+ public function testInvalidStartBatchKey()
{
$batch = [
'invalid' => ['key1' => 'value1'],
@@ -124,6 +124,28 @@ class CallTest extends PHPUnit_Framework_TestCase
/**
* @expectedException InvalidArgumentException
*/
+ public function testInvalidMetadataStrKey()
+ {
+ $batch = [
+ Grpc\OP_SEND_INITIAL_METADATA => ['Key' => ['value1', 'value2']],
+ ];
+ $result = $this->call->startBatch($batch);
+ }
+
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testInvalidMetadataIntKey()
+ {
+ $batch = [
+ Grpc\OP_SEND_INITIAL_METADATA => [1 => ['value1', 'value2']],
+ ];
+ $result = $this->call->startBatch($batch);
+ }
+
+ /**
+ * @expectedException InvalidArgumentException
+ */
public function testInvalidMetadataInnerValue()
{
$batch = [