Lines Matching refs:this

30         $this->server = new Grpc\Server();
31 $this->port = $this->server->addSecureHttp2Port('0.0.0.0:0',
33 $this->server->start();
34 $this->host_override = 'foo.test.google.fr';
35 $this->channel = new Grpc\Channel(
36 'localhost:'.$this->port,
39 'grpc.ssl_target_name_override' => $this->host_override,
40 'grpc.default_authority' => $this->host_override,
48 unset($this->channel);
49 unset($this->server);
54 $this->assertTrue(is_string($context->service_url));
55 $this->assertTrue(is_string($context->method_name));
64 $call = new Grpc\Call($this->channel,
67 $this->host_override);
70 array($this, 'callbackFunc'));
78 $this->assertTrue($event->send_metadata);
79 $this->assertTrue($event->send_close);
81 $event = $this->server->requestCall();
83 $this->assertTrue(is_array($event->metadata));
85 $this->assertTrue(array_key_exists('k1', $metadata));
86 $this->assertTrue(array_key_exists('k2', $metadata));
87 $this->assertSame($metadata['k1'], ['v1']);
88 $this->assertSame($metadata['k2'], ['v2']);
90 $this->assertSame('/abc/dummy_method', $event->method);
103 $this->assertTrue($event->send_metadata);
104 $this->assertTrue($event->send_status);
105 $this->assertFalse($event->cancelled);
112 $this->assertSame([], $event->metadata);
114 $this->assertSame([], $status->metadata);
115 $this->assertSame(Grpc\STATUS_OK, $status->code);
116 $this->assertSame($status_text, $status->details);
124 $this->assertTrue(is_string($context->service_url));
125 $this->assertTrue(is_string($context->method_name));
134 $call = new Grpc\Call($this->channel,
137 $this->host_override);
140 array($this, 'invalidKeyCallbackFunc'));
149 $this->assertTrue($event->send_metadata);
150 $this->assertTrue($event->send_close);
151 $this->assertTrue($event->status->code == Grpc\STATUS_UNAVAILABLE);
156 $this->assertTrue(is_string($context->service_url));
157 $this->assertTrue(is_string($context->method_name));
166 $call = new Grpc\Call($this->channel,
169 $this->host_override);
172 array($this, 'invalidReturnCallbackFunc'));
181 $this->assertTrue($event->send_metadata);
182 $this->assertTrue($event->send_close);
183 $this->assertTrue($event->status->code == Grpc\STATUS_UNAVAILABLE);