aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/php/tests')
-rwxr-xr-xsrc/php/tests/unit_tests/EndToEndTest.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/php/tests/unit_tests/EndToEndTest.php b/src/php/tests/unit_tests/EndToEndTest.php
index 27e27cdfdf..d49bc9ac3a 100755
--- a/src/php/tests/unit_tests/EndToEndTest.php
+++ b/src/php/tests/unit_tests/EndToEndTest.php
@@ -153,4 +153,15 @@ class EndToEndTest extends PHPUnit_Framework_TestCase{
public function testGetTarget() {
$this->assertTrue(is_string($this->channel->getTarget()));
}
+
+ /**
+ * @medium
+ */
+ public function testGetConnectivityState() {
+ $old_state = Grpc\CHANNEL_IDLE;
+ $this->assertTrue($this->channel->getConnectivityState() == $old_state);
+ $this->assertTrue($this->channel->getConnectivityState(true) == $old_state);
+ usleep(500000);
+ $this->assertTrue($this->channel->getConnectivityState() != $old_state);
+ }
}