diff options
author | Stanley Cheung <stanleycheung@google.com> | 2015-08-10 15:46:42 -0700 |
---|---|---|
committer | Stanley Cheung <stanleycheung@google.com> | 2015-08-13 10:48:32 -0700 |
commit | e63354a6e71427b273182455b052ffb606e0eadc (patch) | |
tree | c9de491f16a00daad2757f4e9630d775171bbc9f /src/php/tests | |
parent | 35ea361ff5042bc31acd476a9ca6f9d22bf6a1c6 (diff) |
php: wrap getConnectivityState API
Diffstat (limited to 'src/php/tests')
-rwxr-xr-x | src/php/tests/unit_tests/EndToEndTest.php | 11 |
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); + } } |