channel = new Grpc\Channel( 'localhost:0', [ 'credentials' => Grpc\ChannelCredentials::createInsecure(), ] ); $this->assertSame('Grpc\Channel', get_class($this->channel)); } /** * @expectedException InvalidArgumentException */ public function testInvalidCredentials() { $this->channel = new Grpc\Channel( 'localhost:0', [ 'credentials' => new Grpc\Timeval(100), ] ); } /** * @expectedException InvalidArgumentException */ public function testInvalidOptionsArray() { $this->channel = new Grpc\Channel( 'localhost:0', [ 'abc' => [], ] ); } }