|
|
|
@ -188,11 +188,9 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
unset($server_call); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testInvalidClientMessageArray() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$deadline = Grpc\Timeval::infFuture(); |
|
|
|
|
$req_text = 'client_server_full_request_response'; |
|
|
|
|
$reply_text = 'reply:client_server_full_request_response'; |
|
|
|
@ -209,11 +207,9 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testInvalidClientMessageString() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$deadline = Grpc\Timeval::infFuture(); |
|
|
|
|
$req_text = 'client_server_full_request_response'; |
|
|
|
|
$reply_text = 'reply:client_server_full_request_response'; |
|
|
|
@ -230,11 +226,9 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testInvalidClientMessageFlags() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$deadline = Grpc\Timeval::infFuture(); |
|
|
|
|
$req_text = 'client_server_full_request_response'; |
|
|
|
|
$reply_text = 'reply:client_server_full_request_response'; |
|
|
|
@ -253,11 +247,9 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testInvalidServerStatusMetadata() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$deadline = Grpc\Timeval::infFuture(); |
|
|
|
|
$req_text = 'client_server_full_request_response'; |
|
|
|
|
$reply_text = 'reply:client_server_full_request_response'; |
|
|
|
@ -294,11 +286,9 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testInvalidServerStatusCode() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$deadline = Grpc\Timeval::infFuture(); |
|
|
|
|
$req_text = 'client_server_full_request_response'; |
|
|
|
|
$reply_text = 'reply:client_server_full_request_response'; |
|
|
|
@ -335,11 +325,9 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testMissingServerStatusCode() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$deadline = Grpc\Timeval::infFuture(); |
|
|
|
|
$req_text = 'client_server_full_request_response'; |
|
|
|
|
$reply_text = 'reply:client_server_full_request_response'; |
|
|
|
@ -375,11 +363,9 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testInvalidServerStatusDetails() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$deadline = Grpc\Timeval::infFuture(); |
|
|
|
|
$req_text = 'client_server_full_request_response'; |
|
|
|
|
$reply_text = 'reply:client_server_full_request_response'; |
|
|
|
@ -416,11 +402,9 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testMissingServerStatusDetails() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$deadline = Grpc\Timeval::infFuture(); |
|
|
|
|
$req_text = 'client_server_full_request_response'; |
|
|
|
|
$reply_text = 'reply:client_server_full_request_response'; |
|
|
|
@ -456,11 +440,9 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testInvalidStartBatchKey() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$deadline = Grpc\Timeval::infFuture(); |
|
|
|
|
$req_text = 'client_server_full_request_response'; |
|
|
|
|
$reply_text = 'reply:client_server_full_request_response'; |
|
|
|
@ -475,11 +457,9 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException LogicException |
|
|
|
|
*/ |
|
|
|
|
public function testInvalidStartBatch() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\LogicException::class); |
|
|
|
|
$deadline = Grpc\Timeval::infFuture(); |
|
|
|
|
$req_text = 'client_server_full_request_response'; |
|
|
|
|
$reply_text = 'reply:client_server_full_request_response'; |
|
|
|
@ -557,29 +537,23 @@ class EndToEndTest extends \PHPUnit\Framework\TestCase |
|
|
|
|
$this->assertTrue($new_state == Grpc\CHANNEL_IDLE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testGetConnectivityStateInvalidParam() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$this->assertTrue($this->channel->getConnectivityState( |
|
|
|
|
new Grpc\Timeval())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testWatchConnectivityStateInvalidParam() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$this->assertTrue($this->channel->watchConnectivityState( |
|
|
|
|
0, 1000)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @expectedException InvalidArgumentException |
|
|
|
|
*/ |
|
|
|
|
public function testChannelConstructorInvalidParam() |
|
|
|
|
{ |
|
|
|
|
$this->expectException(\InvalidArgumentException::class); |
|
|
|
|
$this->channel = new Grpc\Channel('localhost:'.$this->port, null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|