diff options
Diffstat (limited to 'src/php/tests/unit_tests/ServerTest.php')
-rw-r--r-- | src/php/tests/unit_tests/ServerTest.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/php/tests/unit_tests/ServerTest.php b/src/php/tests/unit_tests/ServerTest.php index d18feecefe..ac6f2f0312 100644 --- a/src/php/tests/unit_tests/ServerTest.php +++ b/src/php/tests/unit_tests/ServerTest.php @@ -27,9 +27,6 @@ class ServerTest extends PHPUnit_Framework_TestCase public function tearDown() { unset($this->server); - $channel_clean_persistent = - new Grpc\Channel('localhost:50010', []); - $channel_clean_persistent->cleanPersistentList(); } public function testConstructorWithNull() @@ -102,6 +99,24 @@ class ServerTest extends PHPUnit_Framework_TestCase /** * @expectedException InvalidArgumentException */ + public function testInvalidConstructorWithNumKeyOfArray() + { + $this->server = new Grpc\Server([10 => '127.0.0.1', + 20 => '8080', ]); + $this->assertNull($this->server); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testInvalidConstructorWithList() + { + $this->server = new Grpc\Server(['127.0.0.1', '8080']); + $this->assertNull($this->server); + } + /** + * @expectedException InvalidArgumentException + */ public function testInvalidAddHttp2Port() { $this->server = new Grpc\Server([]); |