assertNotNull($channel_credentials); } public function testCreateSslWith3NullString() { $channel_credentials = Grpc\ChannelCredentials::createSsl('', '', ''); $this->assertNotNull($channel_credentials); } public function testCreateInsecure() { $channel_credentials = Grpc\ChannelCredentials::createInsecure(); $this->assertNotNull($channel_credentials); } public function testDefaultRootsPem() { Grpc\ChannelCredentials::setDefaultRootsPem("Pem-Content-Not-Verified"); $this->assertTrue(Grpc\ChannelCredentials::isDefaultRootsPemSet()); Grpc\ChannelCredentials::invalidateDefaultRootsPem(); $this->assertFalse(Grpc\ChannelCredentials::isDefaultRootsPemSet()); Grpc\ChannelCredentials::setDefaultRootsPem("Content-Not-Verified"); $this->assertTrue(Grpc\ChannelCredentials::isDefaultRootsPemSet()); } public function testInvalidCreateSsl() { $this->expectException(\InvalidArgumentException::class); $channel_credentials = Grpc\ChannelCredentials::createSsl([]); } public function testInvalidCreateComposite() { $this->expectException(\InvalidArgumentException::class); $channel_credentials = Grpc\ChannelCredentials::createComposite( 'something', 'something'); } }